I was talking with my wife the other day, and the phrase "hoist with his own petard" came up. This is one I've always liked. In the early days of gunpowder in Europe, a petard was a primitive bomb that would be carried to or buried under a wall to blow up the defensive works. I first heard of them when I was a kid, playing Age of Empires II, and a petard was one of the units you could create. (That's him at right.)
As with any explosives, especially primitive ones, these could go off prematurely. (In Age of Empires, they tended to get blown up when attacked before they did their job, making them pretty useless.) Thus "hoist by his own petard," which means "blown into the air by his own bomb; hence, injured or destroyed by his own device for the ruin of others," according to the OED.
The phrase was created by Shakespeare in Hamlet, which was first published in 1603.
In that play, King Claudius sends Hamlet to the English court with his "friends" Rosencrantz and Guildenstern, along with letters requesting Hamlet's immediate execution. Hamlet suspects that the king is up to no good, and opens the letters, rewriting them so they request the execution of Rosencrantz and Guildenstern, thereby hoisting his uncle by his own schemes. As Hamlet puts it:
There's letters seal'd: and my two schoolfellows, Whom I will trust as I will adders fang'd, They bear the mandate; they must sweep my way, And marshal me to knavery. Let it work; For 'tis the sport to have the engineer Hoist with his own petard: and 't shall go hard But I will delve one yard below their mines, And blow them at the moon.
And thus was born a phrase that's lasted four hundred years.
Petard itself comes from the French and had a funny literal meaning, according to the American Heritage Dictionary: "The French used pétard, 'a loud discharge of intestinal gas,' for a kind of infernal engine for blasting through the gates of a city."
And that, of course, reminds me of this: