Born in Kincardine, he attended Dollar Academy before studying science at the University of Edinburgh. He held various posts in Scotland before being appointed Jacksonian Professor of Natural Philosophy at the University of Cambridge in 1875 which he held jointly with his Royal Institution appointments. In Cambridge he worked on spectroscopy with another chemist, George Liveing, while at the Royal Institution he concentrated on cryogenics, the study of how things behave at low temperatures. In the course of this work in invented the vacuum flask in 1892 and liquefied hydrogen in 1898.
He established the Davy-Faraday Research Laboratory in 1896 and with Lord Rayleigh was its first Director. Working with Frederick Abel on a government explosives committee he invented cordite. He was President of the Chemical Society from 1897 to 1899 and President of the British Association in 1902.