What does the phrase “hoist with one’s own petard” mean and Where does it originate?

The phrase “hoist with one’s own petard” means: Ruined or destroyed by the device or plot one has set for another; caught in one’s own trap.

Had it not been for Shakespeare this expression would undoubtedly have died out long ago. It is found in Hamlet, one of the most popular of his plays.

In Act IV, Polonius, hoping to catch Hamlet in some treasonable utterance in a private conversation with his mother, the queen, has hidden behind an arras in the queen’s chamber, but is discovered and slain by Hamlet, who later says, “For tis the sport to haue the enginer Hoise with his owne petar.”

The “petar,” more correctly “petard,” was not unlike the modern hand grenade, originally of metal, bell-shaped, charged with powder, and fired by fuse; later, a wooden container.

It was used for blowing open a door or making a breach in a wall, and, thanks to poor construction and general ignorance, not uncommonly also blew up the one operating it.