[1][2] Barclay was born at Dysart, Fife, and educated at the High School of Edinburgh.
He studied medicine at the University of Edinburgh, and after visiting Berlin and Paris took the MD degree in 1839.
He later attended Caius College, Cambridge, graduating MB in 1847 and MD in 1852.
[3] He was elected assistant physician to St George's Hospital in 1857, and devoted much attention to the interests of the medical school, lecturing on medicine, and serving as physician from 1862 to 1882.
At the College of Physicians he was examiner in medicine, councillor, censor, Lumleian lecturer, and Harveian orator (for 1881), being elected treasurer in 1884.