He was born of a Covenanting family in Ayrshire, and studied at the University of Glasgow and University of Edinburgh, obtaining his M.A. at the latter, at the suggestion of Sir William Hamilton, for an essay on Stoicism. He became a minister of the Established Church of Scotland, first at Arbroath and then at Brechin, and took part in the Free Church movement of 1843.
In 1852 he was appointed professor of logic and metaphysics in Queen's College, Belfast; and in 1868 was chosen president and professor of philosophy of the college of Princeton University. He resigned the presidency in 1888, but continued as lecturer on philosophy till his death.
He was most successful in college administration, a good lecturer and an effective preacher. His general philosophical attitude and method were Hamiltonian; he insisted on separating religious and philosophical data from the merely physical, and though not an original thinker, he clearly restated and used the conclusions of others. In his controversial writings, he often failed to understand the real significance of the views which he attacked, and much of his criticism is superficial.
His chief works are: