In 1840 Campbell conducted the prosecution against John Frost, one of the three Chartist leaders who attacked the town of Newport, all of whom were found guilty of high treason. Next year, as the Melbourne administration was near its close, Plunkett, the Lord Chancellor of Ireland, was forced to resign, and was succeeded by Campbell, who was raised to the peerage as Baron Campbell, of St Andrews in the County of Fife. The post of chancellor Campbell held for only sixteen days, and then resigned it to his successor Sir Edward Sugden. It was during the period 1841–1849, when he had no legal duty, except the self-imposed one of occasionally hearing Scottish appeals in the House of Lords, that Lord Campbell turned to literary pursuits. He bought Hartrigge House in Jedburgh during this period. However, he did take up the cause of the families of railway accident victims in introducing and steering through the Commons, the Fatal Accidents Act 1846, known as Lord Campbell's Act.