Duncan was the second son of Andrew Duncan, merchant and shipmaster, of Crail, afterwards of St. Andrews, his mother being a daughter of Professor William Vilant, and related to the Drummonds of Hawthornden. He was born at Pinkerton, near St. Andrews, on 17 October 1744, and was educated first by Sandy Don of Crail, celebrated in the convivial song of "Crail Town," and afterwards by Richard Dick of St. Andrews.
Duncan proceeded next to University of St Andrews, where he obtained the M.A. degree in 1762. As a youth he was known as "the smiling boy", and his character for good nature was retained through life. Lord Erskine and his brother Henry Erskine were among his school fellows and fast friends through life. In 1762, he entered Edinburgh University as a medical student, being the pupil of Cullen, John Gregory, Alexander Monro secundus, Hope, and Black.
Duncan was president of the Royal Medical Society in 1764, and five times afterwards. His attachment to the society continued through life; he was its treasurer for many years; and in 1786 a gold medal was voted to him for his services. On the completion of his course of studies in 1768, he went a voyage to China as surgeon of the East India Company's ship Asia. Refusing an offer of five hundred guineas to undertake a second voyage, Duncan graduated M.D. at St. Andrews in October 1769, and in May 1770 became a licentiate of the Edinburgh College of Physicians. In the same year he was an unsuccessful candidate for the professorship of medicine in St. Andrews University.
During the absence of Dr. Drummond, professor-elect of medicine at Edinburgh, Duncan was appointed to lecture in 1774–6. Drummond failing to return, Dr. James Gregory was elected professor, and Duncan started an extra-academical course, as well as a public dispensary, (the first free hospital in Scotland), which afterwards became the Royal Public Dispensary, incorporated by royal charter in 1818.
In 1773, he commenced the publication of Medical and Philosophical Commentaries, a quarterly journal of medicine, at first issued in the name of "a society in Edinburgh", Duncan being named as secretary. It was the first medical review journal published regularly in Great Britain. The seventh volume was entitled Medical Commentaries for the year 1780, collected and published by Andrew Duncan, and reached a third edition. The series extended ultimately to twenty volumes, the last issue being in 1795, after which the publication was entitled Annals of Medicine, of which eight volumes were issued. In 1804 it was discontinued in favour of the Edinburgh Medical and Surgical Journal, edited by his son.
Duncan's extra-academical lectures were continued with considerable success till 1790, when he became the president of the Edinburgh College of Physicians. On Cullen's resignation in that year he was succeeded in the professorship of medicine by Dr. James Gregory, and Duncan followed the latter in the chair of the theory or institutes of medicine (physiology).
In 1792, he proposed the erection of a public lunatic asylum in Edinburgh, having first conceived the idea after hearing of the miserable death of Robert Fergusson in 1774 in the common workhouse. It was not until many difficulties had been surmounted that the project was at last accomplished, and a royal charter was granted in 1807 under which a lunatic asylum was built at Morningside.
Inspired by a miscarriage of justice, he also delivered the first lectures on forensic medicine in Britain, at the University of Edinburgh and campaigned to establish a chair of medical jurisprudence there, which was filled by his son, Andrew Duncan, the younger, who followed him into the profession.
In 1808, the freedom of Edinburgh was conferred upon Duncan for his services in the foundation of the dispensary and the asylum. In 1809, he founded the Caledonian Horticultural Society, which, being afterwards incorporated, became of great scientific and practical value.
In his later years, Duncan was actively occupied in promoting the establishment of a public experimental garden, the scheme for which was actively progressing at his death. In 1819, his son became joint professor with him, and in 1821, Dr. W. P. Alison succeeded to that post, but Duncan continued to do much of the duty to the last. In 1821, on the death of Dr. James Gregory, Duncan became first Physician to the King in Scotland, having held the same office to the Prince of Wales for more than thirty years.
In 1821, Duncan was elected president of the Edinburgh Medico-Chirurgical Society at its foundation. In 1824, he was again elected president of the Edinburgh College of Physicians. Although in his later years, he failed to keep up with the progress of physiology, his zeal was unabated, and he discharged many useful offices with extreme punctuality. He used to say that the business of no institution should be hindered by his absence, whether it was forwarded by his presence or not.
For more than half a century he walked to the top of Arthur's Seat on May-day morning, accomplishing this for the last time on 1 May 1827. He died at his home, Adam Square in Edinburgh on 5 July 1828, in his eighty-fourth year.
He bequeathed to the Edinburgh College of Physicians seventy volumes of manuscript notes from the lectures of the founders of the Edinburgh School of Medicine, and a hundred volumes of practical observations on medicine in his own handwriting. A portrait of him by Raeburn is in the Edinburgh Royal Dispensary, as well as a bust; a full-length portrait was painted in 1825 for the Royal Medical Society by Watson Gordon.
Duncan was industrious, and a perspicuous rather than a brilliant lecturer. He was generous and hospitable to his pupils and, being naturally gregarious, he founded several clubs, among which the Harveian Society, founded in 1782, was the most notable. He was its secretary till his death, and never failed to provide its annual meeting with an appropriate address, usually commemorating some deceased ornament of the medical profession. The Esculapian and gymnastic clubs were also of his foundation, and many of his poetical effusions were read or sung at their meetings. He was much loved for his geniality and benevolence.
Duncan's larger works, besides those already mentioned, are:
- ‘Elements of Therapeutics,’ 1770, second edition 1773.
- ‘Medical Cases,’ 1778, third edition 1784; translated into Latin, Leyden, 1785; translated into French, Paris, 1797.
- An edition of Hoffmann's ‘Practice of Medicine,’ 2 vols. 1783.
- ‘The New Dispensatory,’ editions of 1786, 1789, 1791.
- ‘Observations on the Distinguishing Symptoms of three different Species of Pulmonary consumption,’ 1813, second edition 1816.
- ‘The Edinburgh new Dispensatory : containing 1. The Elements of pharmaceutical Chemistry ; 2. The Materia medica; or the natural, pharmaceutical and medical History, of the Substances employed in Medicine ; 3. The pharmaceutical Preparations and Compositions ; including Translations of the Edinburgh Pharmacopoeia published in 1817, of the Dublin Pharmacopoeia in 1807, and of the London Pharmacopoeia in 1815’ . Bell & Bradfute, Edinburgh 9th Edition 1819 Digital edition by the University and State Library Düsseldorf
In connection with the Harveian Society, Duncan published an oration in praise of Harvey, 1778; and memoirs of Alexander Monro (primus), 1780; Dr. John Parsens, 1786; Professor Hope, 1789; Alexander Monro (secundus), 1818; Sir Joseph Banks, 1821; and Sir Henry Raeburn, 1824.
In connection with one of Dr. James Gregory's many controversies, Duncan published his Opinion, 1808, and a Letter to Dr. James Gregory, 1811, from which the facts can be gathered. A number of his poetical effusions are included in Carminum Rariorum Macaronicorum Delectus (Esculapian Society), 1801, second edition enlarged; and Miscellaneous Poems, extracted from the Records of the Circulation Club, Edinburgh, 1818. He also selected and caused to be published Monumental Inscriptions selected from Burial Grounds at Edinburgh, 1815.
In February 1771, he married Miss Elizabeth Knox, who bore him twelve children. His eldest son, Andrew, also became a professor at Edinburgh. His third son, Alexander Duncan (1780–1859), became a general in the army and distinguished himself in India.
He is buried together with many of his family in a family mausoleum in Buccleuch Churchyard. The Church was built as a Chapel of Ease to resolve overcrowding of the graveyard at its mother church: the parish church of St. Cuthbert's, Edinburgh.
As a favour, one of his prodigy students is buried in the tomb, having died during his studies: Charles Darwin (1758-1778) by blood the uncle of his namesake Charles Darwin the naturalist, but dying before his birth.