The 1862 Preston by-election was held on 4 April 1862, after the incumbent Conservative MP R. A. Cross resigned to enter a private banking business in Warrington. The by-election was won by the Conservative candidate, Thomas Hesketh. Hesketh was related to two previous MPs for the constituency, both also named Thomas Hesketh, one from the 16th century and one from the 18th.
Opposing Hesketh was the Liberal candidate, George Melly, who would later go on to represent Stoke-upon-Trent. Melly faced religious opposition on two fronts. As a Unitarian, he was viewed as barely better than an atheist by many of the electors belonging to the Church of England, while he was also opposed by Catholics, influenced by Papal hostility towards the foreign policy of the incumbent Liberal government led by Lord Palmerston.
The aftermath of the by-election was captured in the painting "The Preston By-Election of 1862" by the Anglo-Russian artist Vladimir Osipovich Sherwood, who was based in nearby Blackburn at the time. Sherwood's painting, which features Hesketh addressing a crowd amid Conservative party iconography, also includes veiled accusations of voter bribery, with people scrabbling for coins appearing prominently in the foreground.
Supporters of the Liberal candidate attributed Hesketh's win to the Conservative's spending power. This included accusations that voters were being offered as much as £25 in exchange for their support, an attractive prospect as the constituency was badly affected by the ongoing Lancashire Cotton Famine. A subsequent recall petition against Hesketh was initiated after the by-election, instigated by the perceived financial impropriety. However it was ultimately unsuccessful, due to a combination of the potential cost, and because Melly's allies doubted that he would win the re-run campaign.
Result.
! scope="col" colspan="2" style="width: 130px"|Party
! scope="col" style="width: 17em"|Candidate
! scope="col" style="width: 5em"|Votes
! scope="col" style="width: 3.5em"|%
! scope="col" style="width: 3.5em"| ;templatestyles src="Template:Tooltip/styles.css" / ;±%
! colspan="3" style="text-align: right; margin-right: 0.5em" | Majority
! colspan="3" style="text-align: right; margin-right: 0.5em" scope=row | Turnout
! colspan="3" style="text-align:right;" scope=row | Registered electors
! style="text-align:right;" | Swing