One of the most satisfying ways to defeat the villain is to have his own nefarious scheme bring about his downfall. In Hamlet, Shakespeare described this as “hoist by his own petard,” or blown up by his own bomb. Basically, it’s a self-deposing villain whose evil plans have gone horribly right.
Not only is this a delicious form of death by irony, it’s also a satisfying way to show cosmic justice in action while allowing the heroes to keep their hands clean. When done best, the villain keeps the tension notched up to eleven and only commits his fatal mistake after the heroes have made their last stand. Bonus points if the petard takes the form of a minion who decides to switch sides.
Perhaps unsurprisingly, you’ll often find this trope in stories geared towards a younger audience, which generally try to avoid messy endings and shades of gray. In some ways, it almost resembles a Disney Villain Death, in that the heroes often come out with clean hands and an unambiguously clear conscience.
However, this isn’t always the case–sometimes, it’s precisely because of the shades of gray that the villain’s plans become self-defeating. Case in point, Pride and Kimblee from Fullmetal Alchemist: Brotherhood. You’d think that both characters are totally evil–and perhaps they are–but that doesn’t stop the one from undermining the other at just the right moment.
When done right, this is an incredibly satisfying way to defeat a bad guy. When done poorly, however, it undermines the villain altogether, or turns the story into just another Aesop. As always, your mileage may vary, so when writing one of these stories it’s important to keep your audience in mind.
In my own books, it’s probably more common for this to happen to the heroes, which probably makes it a form of Two Rights Make A Wrong or Nice Job Breaking It, Hero. I do enjoy hoisting the villains as well, though, and will almost certainly use this trope in the future.