He was born on 17 April 1812 in Ayr to the Scottish physician David Maclagan FRSE (1785–1865), and Jane Whiteside.
His youngest brother was the eminent accountant, David Maclagan FRSE (1824-1883) manager of the Edinburgh Life Assurance Company.
Maclagan was a close friend of toxicologist Robert Christison, and he developed an interest in toxicology and forensic medicine.
[5] Maclagan was appointed to the Chair of Medical Jurisprudence and Public Health at the University of Edinburgh in 1862, retiring in 1897.
A son, David Philip Maclagan, was a surgeon in the Royal Navy and died in Honduras in 1860, aged only 23.