The New Dictionary of Cultural Literacy, Third Edition. 2002.
hoist by ones own petard
(pi-TAHRD) To be caught in ones own trap: The swindler cheated himself out of most of his money, and his victims were satisfied to see him hoist by his own petard. A petard was an explosive device used in medieval warfare. To be hoisted, or lifted, by a petard literally means to be blown up.
It is amazing how many of these old idioms are used daily and assumed to mean something they do not. One of my favorites is "rule of thumb." Some say it is in reference to British common law that allowed a man could beat his wife provided the stick was no larger than his thumb. Others say that definition is an urban legend that has persisted for two centuries.