petard
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'.