Gregory was a younger son of Dr James Gregory, a leading Scottish physician, by his second wife Isabella Macleod, and was one of no fewer than eleven children. His twin brother, William Gregory, was a notable chemist. His grandfather, John Gregory, was a notable physician and moralist and his grandfather’s grandfather, James Gregory was a mathematician and astronomer. Gregory was accordingly born into Scottish academic purple. Donald lived at the family home of 10 Ainslie Place in the Moray Estate in Edinburgh for all of his later life.
The total want of private papers and title-deeds connected with the different branches of this family … and the defective state of the earlier records of Scotland, in relation more especially to the Highlands, have made this investigation no easy task.
Gregory’s attachment to contemporary documentary evidence was remarkable for his time. The Edinburgh Literary Journal described his work as “the first instance on record of a trustworthy history of a Highland clan resting upon contemporary evidence”. In the year before his death, Gregory published his most substantial and famous work, a History of the Western Highlands and Isles of Scotland from AD 1493 to AD 1625. Nearly 170 years later, a historian of the same period commented that his views on Highland history “still command respect”. In his preface, Gregory explained why he had chosen to focus only on the Western part of the Highlands, describing its separate development and observing:
...during a great portion of the period I have endeavoured to illustrate, the Western Clans had a common object which frequently united them in hostility to the government. In this way, the measures employed at first for their coercion, and afterwards for their advancement in civilization, came naturally to be separate from those directed to the subjugation and improvement of the Eastern tribes.
He attributed his focus on the years between 1493 and 1625 to the sparseness of previous historical treatment of the period - describing it "as nearly as possible a perfect blank" - and added:
...when I discovered that our national records and other sources of authentic information were full of interesting and important matter bearing upon this portion of the history of the West Highlands and Isles, I no longer hesitated.
Gregory also found time to interest himself in such diverse matters as the skulls of ancient druids, the history of archery in Scotland, the history of Clan Chattan and the life of Bishop Carswell. He was called as an authority on historical manuscripts and a hand-writing expert by the pursuers who successfully alleged forgery in the Stirling Peerage Case. Gregory died in Edinburgh on 21 October 1836. He is buried in the family plot with his siblings and next to his parents in the south-west corner of Canongate Churchyard, immediately next to the grave of Adam Smith. The specific grave also contains his brother Dr James Crawford Gregory.