hoist with 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.
Farlex Dictionary of Idioms. © 2015 Farlex, Inc, all rights reserved.
hoist with one's own petard
Fig. to be harmed or disadvantaged by an action of one's own which was meant to harm someone else. (From a line in Shakespeare's Hamlet.) She intended to murder her brother but was hoist with her own petard when she ate the poisoned food intended for him. The vandals were hoist with their own petard when they tried to make an emergency call from the pay phone they had broken.
McGraw-Hill Dictionary of American Idioms and Phrasal Verbs. © 2002 by The McGraw-Hill Companies, Inc.