Boswell [q. v.] in a duel. Sir James Mackintosh said of it in the House of Commons that it 'had not been surpassed in the whole range of ancient or modern forensic eloquence.'
After 1815 Cockburn was engaged as counsel for the defence of prisoners accused of political offences, and was a prominent speaker at whig public meetings. He also advocated the extension of the parliamentary and municipal franchises of Edinburgh in the following pamphlets: (1) 'A Letter to the Inhabitants of Edinburgh on the New Police Bill,' 1822; (2) 'Considerations submitted to the Householders of Edinburgh on the State of their Representation in Parliament,' 1823; (3) 'An Explanation of the State of the Case of the Edinburgh Representation in Parliament,' 1826. They were issued anonymously, but on the flyleaf of each of them in the library of the British Museum appears the statement, in Cockburn's handwriting, 'Written by me, H. C.' Another pamphlet of Cockburn's similarly acknowledged by him is entitled 'Observations on the Mode of Choosing Juries in Scotland,' 1822, a protest against the now long-abolished practice which allowed the judge in a criminal case to select at his pleasure from the jury-lists jurors who were to try it. To the 'Edinburgh Review' for January 1824 he contributed the article, 'Office of Lord Advocate of Scotland,' objecting to that official's combination of the functions of an English home secretary with those of an English attorney-general. An article, 'Criminal Law of Scotland,' in the 'Edinburgh' for January 1825, enforced the same view, which was virtually adopted by the legislature sixty years later. He contributed another article on the Scottish poor laws in October 1824. In 1825 he presided at the Edinburgh banquet (5 April) to Henry (afterwards Lord) Brougham [q. v.]
In the 'Edinburgh Review' for April 1830 Cockburn wrote upon 'Scottish Judicial Reforms: the Law of England and Scotland,' and in the October number a trenchant article on 'The Parliamentary Representation of Scotland.' On the formation of the Grey ministry in the following December he was appointed solicitor-general for Scotland, Jeffrey becoming lord advocate, and he was summoned to London the same month to confer with a committee of the whig cabinet upon a measure of Scottish parliamentary reform. During a second visit to London in September 1831 the draft, mainly Cockburn's handiwork, of the first Scotch Reform Bill was completed. In 1831 he was elected lord rector of the university of Glasgow in preference to Joseph Hume and John Gibson Lockhart, delivering his inaugural address 6 Jan. 1832. In 1833, the votes of the four 'nations' being equally divided between himself and Sir Daniel Sandford, the professor of Greek, he gave his casting vote in favour of his own re-election, explaining his reasons for the step (see his Journal, i. 55) in a printed 'Letter by the late Rector of the University of Glasgow to the Electors, November 1833.' In November 1834 he was appointed, as Lord Cockburn, one of the judges of the court of session, and in 1837 he became a lord of justiciary. As a judge he was more eminent in criminal than in civil cases, having been always somewhat deficient in a technical knowledge of the law. His decisions in civil cases were therefore often reversed by his brethren, but often, too, confirmed on appeal, by the House of Lords, a result said to have been due to the 'utterly untechnical character of his mind, which made his exceptionally terse and lucid judgments read in the eyes of a foreign lawyer with a force not due to their intrinsic merits' (North British Review for November 1856, art. 'Cockburn's Memorials'). He strenuously co-operated with some of his whig brethren in judicially upholding those claims of the Scottish kirk to independence of the state which, repelled by a majority of the judges of the court of session and rejected by parliament, led to the disruption of 1843 and the formation of a free kirk of Scotland. Apparently his one contribution during his judgeship to the 'Edinburgh Review' was the article in the number for January 1846, 'Scottish Criminal Jurisprudence and Procedure.' In 1852 appeared, in two volumes, his agreeable and sympathetic work, 'The Life of Lord Jeffrey, with Selections from his Correspondence,' a second edition of which was called for immediately. Cockburn's last appearance in print, made a few weeks before his death, was as the writer of letters in a local newspaper, suggesting a scheme for the architectural improvement of Edinburgh. He was fond of protesting against such acts of vandalism and projects for defacing the Scottish capital as are chronicled in his 'Letter to the Lord Provost on the best ways of Spoiling the Beauty of Edinburgh' (reprinted as an appendix to his 'Journal'). One of its chief modern educational institutions, the Edinburgh Academy, was (in or about 1823) projected by Cockburn in conjunction with Leonard Horner, and its citizens have given his name to the most picturesque of the streets built in Edinburgh since his death. Cockburn died 26 April 1854 at Bonaly, the house and grounds of which he had greatly improved, extended, and embellished, and he was buried in the Dean cemetery, Edinburgh, near the grave of his friend, Lord Jeffrey. He was below