From 1879 to 1884 he was Cavendish professor of experimental physics in the university of Cambridge, in succession to Clerk Maxwell; and in 1887 he accepted the post of professor of natural philosophy at the Royal Institution of Great Britain, which he resigned in 1905.
He held the chair of Natural Philosophy in Marischal College, Aberdeen, from 1856 till the fusion of the two colleges there in 1860.
Forbes, as professor of natural philosophy at Edinburgh, and this chair he occupied till within a few months of his death, which occurred on the 4th of July 1901, at Edinburgh.
With Lord Kelvin he collaborated in writing the well-known Treatise on Natural Philosophy.
He taught Latin in the first two years, and natural philosophy in the third.