Poet and literary critic. Born at Houstoun House (West Lothian), the third son of Major Norman Shairp of Houstoun, Shairp was educated at Edinburgh Academy and the University of Glasgow and Balliol College, Oxford. While studying at the latter, he won the Newdigate Prize for a poem on Charles XII of Sweden. He taught at Rugby School under Archibald Tait (1811-82).
He returned to Scotland taking a post in the University of St. Andrews, before being appointed to the Chair of Humanity in 1861. He went on to become Principal of United College, St Andrews, in 1868. He was elected to the Chair of Poetry at Oxford in 1877, while retaining his position in St. Andrews.
His works include Kilmahoe, a Highland Pastoral (1864), Studies in Poetry and Philosophy (1868) and Glen Desseray, and other Poems (published posthumously in 1888). He edited a biography of his predecessor as Principal of United College, the physicist Prof. James D. Forbes (1809-68). Perhaps most notably, he also edited Dorothy Wordsworth's Recollections of a Tour in Scotland (1874).
He died at Ormsary (Argyll and Bute).