The phrase “hoisted with his own petard” is found in Shakespeare’s Hamlet, and refers to being a victim of one’s own scheming.
It has come to mean that someone has been or will be hurt by the very device he’s created to injure someone else.
Hoist means to raise something into the air, while petard is an antiquated word for bomb.
Therefore, if you were “hoisted on your own petard,” it means you were blown up by your own bomb.