Hoist on his own petard. Caught in his own trap, involved in the danger he meant for others. The petard was a conical instrument of war employed at one time for blowing open gates with gunpowder. The engineers used to carry the petard to the place they intended to blow up, and fire it at the small end by a fusee. Shakespeare spells the word petar. “'Tis the sport to have the engineer hoist with his own petar.” (Hamlet, ii. 4.)
“Turning the muzzles of the guns Magdalawards, and getting a piece of lighted rope [the party] blazed away as vigorously as possible ... and tried to hoist Theodore on his own petar.” Daily paper.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894