The answer is:
Spencer Percival
Spencer Perceval (1762-1812) is the only British Prime Minister to have been assassinated.
The Orders in Council against trade which Perceval had instituted in 1807 became unpopular in the winter of 1811 with Luddite riots breaking out. Perceval was forced to concede an inquiry by the House of Commons.
On 11 May 1812, Perceval was on his way to attend the inquiry when he was shot through the heart in the lobby of the House of Commons by a mentally unsound man named John Bellingham, who blamed his financial instability on a casual suggestion of Perceval. He died almost instantly, uttering the words "I am murdered," and Bellingham gave himself up to officers. He was found guilty and hanged a week later.