In 1796 Perceval was elected MP for Northampton. In the House of Commons Perceval became a strong supporter of William Pitt and the Tory group in Parliament. When Henry Addington became Prime Minister in 1801 he appointed Perceval as his solicitor-general. The following year he was promoted to attorney-general.
When Lord Portland became Prime Minister in 1807 he appointed Perceval as his Chancellor of the Exchequer. Perceval got on well with George III and loyally supported the king's opposition to Catholic Emancipation.
When Portland died in 1809, Spencer Perceval accepted the king offer to become Prime Minister. Perceval's period of power coincided with an economic depression and considerable industrial unrest. This resulted in his government introducing repressive methods against the Luddites. This included the Frame-Breaking Act which made the destruction of machines a capital offence.
Perceval held the post until 1812 when he became the only British Prime Minister in history to be assassinated. Spencer Perceval was shot when entering the lobby of the House of Commons by John Bellingham, a failed businessman from Liverpool. Bellingham, who blamed Perceval for his financial difficulties, was later hanged for his crime.