He was born in Calcutta, the son of Captain Robert MacFarlane, 9th of Gartartan.
He joined the British Army as an Ensign on 26 May 1780 and was promoted Lieutenant on 22 May 1793, Captain on 25 September 1793, Major on 12 November 1794, Lieutenant-Colonel on 19 September 1794, Colonel on 1 January 1800, Major-General on 25 April 1808, Lieutenant-General on 4 June 1813 and General 22 July 1830.[4]
On 10 February 1815, at Palermo, MacFarlane married Maria Gertrude, eldest daughter of G. Henry Vankemper, (a captain in the Dutch Navy and Consul of the Netherlands at Tripoli).[5]
Hart, H.G. (1841), The New Army List, for January 1841, London: John Murray, p. 83
Court magazine and monthly critic (1837), "Genealogical Memoir of the MacFarleanes", The Court magazine and monthly critic, vol. 10 (New Series vol. III ed.), London: Edward Churton, p. 2