The Duke of Wellington was the only British prime minister to fight a duel while in office. It was with Lord Winchelsea in Battersea Park in 1829.
Wellington aimed at the legs and missed. Lord W. fired in the air and apologised.
In 1809 George Canning (then Foreign Secretary, later Prime Minister) fought a duel with Lord Castlereagh on Putney Heath. Canning was wounded in the leg. Both men resigned.