HOIST.....A petard is a bomb....can you be hung with a bomb?
"hoist" in this case means to be literally blown upwards.
Word History: The French used petard, Âa loud discharge of intestinal gas, for a kind of infernal engine for blasting through the gates of a city. ÂTo be hoist by one's own petard, a now proverbial phrase apparently originating with Shakespeare's Hamlet (around 1604) not long after the word entered English (around 1598), means Âto blow oneself up with one's own bomb, be undone by one's own devices. The French noun pet, Âfart, developed regularly from the Latin noun pditum, from the Indo-European root *pezd-, Âfart.Â
Some have been "unhung," however, like Jake Barnes. It was a rotten way to be wounded.
From Wikipedia on "petard":
The word remains in modern usage in the phrase to be hoisted by one's own petard, which means "to be harmed by one's own plan to harm someone else" or "to fall in one's own trap". Shakespeare coined the now proverbial phrase in Hamlet.
In the following passage, the "letters" refer to instructions (written by his uncle Claudius, the King) to be carried sealed to the King of England, by Hamlet, Rosencrantz, and Guildenstern, the latter being two schoolfellows of Hamlet. The letters, as Hamlet suspects, contain a death warrant against Hamlet, who will later open and modify them to instead request the execution of Rosencrantz and Guildenstern. Engineer refers to a military engineer.
After modifying the letters Hamlet (rather improbably) escapes the ship and returns to Denmark.
The verb "hoist" is an irregular past tense of the obsolete verb "hoise", meaning "raise" or "lift". The same form is used in "burn" and "burnt".
The phrase is usually misquoted as "see the engineer hoist by his own petard" and is taken to mean "the hangman hanged with his own rope", or, as in Roadrunner cartoons, a rope, put out to catch something, entangles and hangs the one who set the trap, while the audience "sees" (watches) in amusement.
Hamlet's actual meaning is "cause the bomb maker to be blown into the air with his own bomb", metaphorically turning the tables on Claudius, whose messengers are killed instead of Hamlet.
Thank you for solving this age-old mystery!