 In 1764, McGillivray was born at Dunlichity, near Daviot in the Scottish Highlands.He was the eldest son of Donald Roy McGillivray (1741–1803), tacksman of Achnalodan in Dunmaglass and later of Dalscoilt in Strathnairn.His mother, Anne (1740–1807), was the daughter of Lieutenant John McTavish (1701–1774), of Garthbeg.