A Whig, Charles Shaw Lefevre was Member of Parliament for Downton from 1830 to 1831, for Hampshire from 1831 to 1832 and for North Hampshire from 1832 to 1857. He acquired, says the Encyclopædia Britannica, "a high reputation in the House of Commons for his judicial fairness, combined with singular tact and courtesy." When the incumbent Speaker of the House of Commons retired in 1839, Shaw Lefevre was put forward as the Whig candidate and defeated the Tory candidate Henry Goulburn by 317 votes to 299. Shaw Lefevre remained speaker until 1857, by which time he was second-longest-serving speaker ever. On his retirement in 1857 he was elevated to the peerage as Viscount Eversley, of Heckfield in the County of Southampton.