Perhaps his most important appearance as a member of parliament (MP) for Stafford was in defence of Lord John Russell's first Reform Bill (1831). In a speech, based on Charles James Fox's declaration against constitution-mongering, he supported both the enfranchising and the disfranchising clauses. The following year (1832) found Campbell Solicitor General, a knight and member for Dudley. Dudley had been enfranchised under the Reform Act of 1832 and so Campbell became the first MP to represent the town in modern history. However, his appointment to the post of Attorney General in 1834 lead to a by-election, which he lost to Thomas Hawkes. John Campbell returned to Parliament swiftly, however, as he was returned by Edinburgh in 1835, which seat he represented until his ennoblement in 1841. One of his first acts as Attorney General was the prosecution of a bookseller called Henry Hetherington on the charge of blasphemous libel. In this case Campbell gave his opinion that morality depended on divine revelation: