Andrew Duncan, son of Andrew Duncan the elder (1744-1827), was born in Edinburgh on 10 August 1773. He studied medicine at the University of Edinburgh and was apprenticed to the Edinburgh surgeons Alexander and George Wood. He graduated with the degree of M.A. in 1793 and M.D. in 1794. He then studied in London and made visits to medical schools abroad, in Gottingen, Vienna, Pisa and Naples among others. On his return to Edinburgh he became a Fellow of the Royal College of Physicians and a Physician to the Royal Public Dispensary. He then became Physician to the Fever Hospital at Queensberry House. Duncan's travels abroad had shown him the necessity of closer co-operation between the medical profession and the State, particularly with regard to criminal law, and he stressed this point whenever he could.
Indeed, in 1807 a Chair of Medical Jurisprudence and Medical Police was set up at Edinburgh University with Duncan as its first Professor. In addition, from 1809 to 1822, he performed the duties of Secretary of the Senatus and Librarian to the University. In 1819 he resigned as Professor of Medical Jurisprudence on being appointed to assist his father in the Chair of the Institutes of Medicine. In 1821, Duncan was elected Professor of Materia Medica at Edinburgh University. His Edinburgh Dispensary was published in 1803. From 1816 until his death, Duncan was an active member of the Commission for the re-building of the University (the Adam-Playfair buildings of the Old College). Andrew Duncan, junior, died on 13 May 1832.