Way back in the deep and murky past of the late 20th Century, the British Government wisely decided to stop executing people. Public hangings were at one time a form of free entertainment for the masses, but in more enlightened times hangings became private and then… stopped. Understand the important distinction here that the death penalty was not "abolished"; it was just stopped, in a typically polite and English way. Rather than change the law, it was mutually decided by the authorities that they should stop with the hanging.
There are still three offences in the UK that could, potentially see a person dancing the Tyburn Jig on the end of a rope.
Piracy of the High Seas
Believe it or not, British sea captains both military and civilian still have the right to hang pirates from the yard arm. This means the off-and-on row over fishing rights in the Irish Sea with Spanish fishermen could one day turn quite suddenly nasty. Attempt to Assassinate Royal Family Member
High treason attempted (or indeed, successful) Assassination of a member of the Royal Family still carries the death penalty in the UK. Blasphemous Libel
This offence concerns implying or stating in any recorded medium or public performance that Jesus was gay. It pops up every few years in connection with arty theatrical productions concerning Himself, and there have on occasion been calls from the religious right in England for writers, directors and producers to be hanged. Fortunately, the English religious right are considerably weaker than their American counterparts and the offending plays are usually banned, without recourse to the noose.
There are also a couple of old laws as yet un-repealed that are punishable with death:
In the town of York, a medieval curfew against the Welsh is still in effect, although not enforced; the punishment for being Welsh within the town limits is to be shot full of arrows. There are also a number of towns in the north of England with similar curfews against the Scottish, specifying that it is the duty of all townsmen to shoot dead with a longbow any Scotsman seem within the town limits after dark.
Finally, although no longer on the statutes, it used to be illegal to be French in the UK; the most prominent example of this law being enacted was in Cornwall, where a lynch mob mistook a sea captain's pet monkey for a French sailor. Incidentally, medieval French law held that animals were equally liable as human beings; this led to a number of pigs and goats being executed for bestiality and witchcraft.
First, there's currently a call to re-institue the death penalty after two luridly high-profile murder cases.
Second, while you can't be executed by a court, you can effectively be shot dead in the UK on suspicion of being a terrorist. Charles De Menezes was shot seven times at point blank range for the heinous crime of running to catch a train; there have been some 30 fatal shootings by police in the last year, without a single investigation or suspension of the officers concerned.