Lockhart was born on 12 June 1794[2][3] in the manse of Cambusnethan House in Lanarkshire to Dr John Lockhart, who transferred in 1796 to Glasgow, and was appointed minister in the Presbyterian Church of Scotland, and his second wife Elizabeth Gibson (1767–1834), daughter of Margaret Mary Pringle and Reverend John Gibson, minister of St Cuthbert's, Edinburgh.
He fell into ill-health, and had to be removed from school before he was 12; but on his recovery he was sent at this early age to the University of Glasgow, and displayed so much precocious learning, especially in Greek, that he was offered a Snell exhibition at Oxford.
He read French, Italian, German and Spanish, was interested in antiquities, and became versed in heraldic and genealogical lore.
[6] In 1813, Lockhart took a first in classics then, for two years after leaving Oxford, lived in Glasgow before settling to the study of Scots law at the University of Edinburgh where, in 1816, he was elected to the Faculty of Advocates.
A tour on the continent in 1817, when he visited Goethe at Weimar, was made possible when he was hired by the publisher William Blackwood to translate Friedrich Schlegel's Lectures on the History of Literature.
[8] Lockhart (along with John Wilson (Christopher North)), had joined its staff upon his return from Europe in 1817, and contributed to the caustic and aggressive articles that marked the early years of Blackwood's.
Lockhart wrote virulent articles on "The Cockney School of Poetry" of Leigh Hunt,[9][10] Keats[11] and their contemporaries, although he did show appreciation of Coleridge and Wordsworth,[12][6] and he praised Percy Bysshe Shelley, calling him "a man of genius".
Scott refused; a series of letters were exchanged and the argument evolved into Scott’s insistence that Lockhart admit that he (Lockhart) was, in fact, the anonymous editor of Blackwood’s (it was common practice at the time to act an editor, and/or as a writer, anonymously, or using a pseudonym).
According to the papers of Scott’s friend Peter George Patmore, who tried to negotiate a truce and kept a meticulous record of the matter, not only did Lockhart refuse to admit to his editorship, but he responded with "abusive epithets".
[19] In 1825 Lockhart accepted the editorship of the Quarterly Review, which had been in the hands of Sir John Taylor Coleridge since William Gifford's resignation in 1824.
It was a happy marriage, with winters spent in Edinburgh and summers at Chiefswood, a cottage on Scott's Abbotsford estate, where the Lockhart's first child John Hugh ‘Johnnie’ was born.
His third child was Walter Scott Lockhart, who became an army officer, but fell into bad company, ruined his health, and died in his father’s arms in January 1853 at the age of 26.
He moved back to Scotland to live with his only surviving child Charlotte, who was settled at Abbotsford with her husband James Hope-Scott, grandson of the 2nd Earl of Hopetoun.
[20] His obituary in The Times, dated 9 December 1854, included the paragraph "Endowed with the very highest order of manly beauty, both of features and expression, he retained the brilliancy of youth and a stately strength of person comparatively unimpaired in ripened life; and then, though sorrow and sickness suddenly brought on a premature old age which none could witness unmoved, yet the beauty of the head and of the bearing so far gained in melancholy loftiness of expression what they lost in animation, that the last phase, whether to the eye of painter or of anxious friend, seemed always the finest."
The composer Hubert Parry set a modified version of the second half of Lockhart's poem 'Beyond' to music, "There is an old belief" as the fourth of his collection of six choral motets, Songs of Farewell.