Born in Edinburgh on 3 November 1717 the son of William Miller of Glenlee WS, Kirkcudbrightshire and of Barskimming, Ayrshire, and Janet Hamilton, he was educated at Glasgow University (1730) and Edinburgh University (1738).