hoist with your own petard

hoist by/with (one's) own petard

To be injured, ruined, or defeated by one's own action, device, or plot that was intended to harm another; to have fallen victim to one's own trap or schemes. ("Hoist" in this instance is the past participle of the archaic form of the verb "hoise.") I tried to get my boss fired by planting drugs on him, but I was hoist by my own petard when the police caught me with them beforehand.
See also: by, hoist, own, petard
Farlex Dictionary of Idioms.

hoist with (or by) your own petard

have your plans to cause trouble for others backfire on you.
The phrase is from Shakespeare's Hamlet: ‘For 'tis the sport to have the enginer Hoist with his own petard’. In former times, a petard was a small bomb made of a metal or wooden box filled with explosive powder, while hoist here is the past participle of the dialect verb hoise , meaning ‘lift or remove’.
See also: hoist, own, petard
Farlex Partner Idioms Dictionary
See also:
  • be hoist by (one's) own petard
  • be hoist with (one's) own petard
  • be hoist with one's own petard
  • be hoist/hoisted by/with your own petard
  • at will
  • about (one's) business
  • about business
  • be on (one's) pat
  • at the end of (one's) fingertips
  • be remembered for (something)
References in periodicals archive
If someone gives you short shrift in a new-fangled way it probably puts you on your mettle because you don't want to eat humble pie or be hoist with your own petard. These are common, easily understood expressions--but what about shrift, newfangled, mettle, humble pie, and petard?