Unlike other media, this trope can frequently apply to the gameplay process alone in video games. However, this trope is still often crucial to the plot of each work, and so spoilers are to be expected and cannot always be marked. Read at your own discretion.
Meta example here: "Snarky guy in coffee queue eyes off my BioShock Infinite T-shirt, suggests I 'probably haven't even played it'. So I told him the ending."
As a rule of thumb, most games have multiple ways of the player killing himself in an attempt to kill his opponent. Especially splash damage from rockets and grenades; explosives in general are notorious in many games for killing both the shooter and target.
Games with Attack Reflector magic/skills/abilities allow for this, especially if the backfiring attack was an instant-kill or the enemy in question was already half-dead.
In Age of Empires II (Conqueror's Expansion) there is the Petard unit. It is a large, bulky guy carrying two giant kegs (looks like one in each arm) of gunpowder, it then walks into (say) a wall and explodes, killing the unit and doing a good deal of damage, destroying most weak buildings. If it’s attacked and killed, the unit explodes anyway, leading to a literal case of Hoist By His Own Petard.
Spamming these is a quick way to take down most buildings, and don't worry, We Have Reserves.
Your units aren't Friendly Fireproof from siege equipment (though thankfully they are from archers and cannoneers) so unless you're very careful you can lose units to your own catapults. Of course, you can also trick enemy catapults into killing their own side.
Age of Empires III (The Warchiefs expansion onwards) also has a Petard unit. This time, it's two normal-looking soldiers carrying one keg of gunpowder, who will light the case, plant it by the building, and then both men will try to run away. They never make it.
At least one example (possibly two, depending on the player's choices) in Alpha Protocol:
Early in the game, Mike Thorton is betrayed by his Government Agency of Fiction, Alpha Protocol, which tries to kill him to cover up its dirty deeds. After he escapes, he is able to use Alpha Protocol's own safehouses as his bases while he battles them, because the agency is so compartmentalized that not even the bosses know what all of its resources are.
In Moscow, Thorton can forge an alliance with a rival band of covert operatives, G22, who will agree to sell him weapons and intel for his future missions. Very shortly, however, he can decide to go with a different handler for a critical mission, which makes G22 his enemies. This decision, however, will not be made until after Thorton has had the opportunity to buy all of G22's intel for the mission, including a strategically placed sniper rifle that he can use to kill dozens of their agents.
Can occur in an interesting way in Ape Escape 3: Certain monkies can do a special attack that knocks the player on his/her butt and drop their equipped item. It's limited to the Stun-Club and the Monkey-Net. If, let's say, you get caught by your own monkey-net, what do you think happens? You get sent back to the hub-level. Truly hoisted by the player's own petard!
The Vendigroth Device in Arcanum invokes this; certain powerful mages have the ability to seal themselves in a magical cocoon at the moment of their deaths, regenerating their bodies and increasing their lifespans. Because magick and technology disrupt one another in the Arcanum-verse, the device uses science to turn a mage's own power against them, making the cocoon destroy their bodies.
Twice in BioShock. The first incident, you just hear it in an audio-diary and see the result: sinister detached Mad Scientist Dr. Suchong is killed by one of the Big Daddies he's been working to produce, when his attempts to make them "imprint" on the Little Sisters unexpectedly succeeds. The second time, you're there to see it happen: "Atlas"/Fontaine being mobbed and killed by a whole gang of Little Sisters armed with syringes... Definitely creepy.
There's a third one, available as a special achievement. After you kill Sander Cohen, take his photograph. Since the entire mission for Cohen rests on killing his "apprentices" and taking their photos, the name of the achievement, appropriately enough, is "Irony".
In fact, the main character, Jack, himself was more or less a creation of Fontaine's meant to help him take over Rapture. In the end, he becomes the very thing that leads to Fontaine's downfall.
Nitro Splicers (which throw Molotovs at the player) plus the Telekinesis Plasmid is a very literal example of this trope.
This trope is used doubly for Barlowe, as he not only does he get killed by his own student/"daughter"/experiment, but ALSO by his own moves if you have the foresight to pull it off of him mid-fight.
In one of the bad endings of Dawn of Sorrow, Celia Fortner (seemingly) kills Mina in front of Soma, hoping to trigger his transformation into Dracula. She succeeds. Pity that she then ends up being the first victim of the new Dark Lord.
A form of this: In the intro to Command & Conquer Red Alert, Einstein uses a time machine to erase Hitler from history. In the intro to Red Alert 3, the Soviets use a time machine to erase Einstein from history.
Not a clear-cut example, though, as the time machines are different. One was developed by Einstein (a different Einstein, though), and the other by Dr. Zelinsky.
Part of the reason why Daikatana was so thoroughly bashed upon release lies in that trope. In the first set of levels, every weapon the player comes across seems to be specifically designed to do at least as much damage to its own user as it does to actual enemies. An ion blaster, found near a river, which shorts out when fired underwater and bounces missed shots back into your own face and a C4 launcher which only throws the explosive far enough that you'll be at the edge of the explosion are the most prominent examples.
The potential fates of at least three of Dead Rising's bosses.
Adam the Clown. Woozy after the fight, he ends up falling on his own Weapon of Choice — a pair of mini chainsaws. While they're turned on. Laughing as they slice his guts to ribbons.
Sean Keanan. Leader of the Raincoat Cult that worships its god in the form of a creepy faceless mannequin with a sword driven through it. When he stumbles over to it and screams to be given strength after losing the fight, it falls over, driving the sword in the middle right into his eye.
This also happens to several bosses in the sequel, Dead Rising 2.
Antoine Thomas. A very lethal and very crazy chef, he catches and cooks up survivors that stumble into his restaurant. At the end of his boss fight, he stumbles away from the player and winds up dunking his head and half his body into a vat of boiling-hot fry oil.
In all Dead Space games, enemies that launched explosive projectiles at you (legless Brutes, Pods, Guardians) could have them caught with stasis and reflected back at them. Dead Space 3 even had Unitologist troopers with missile launchers and allowed you to do the same with their rockets. Similarly, the Waster Necromorphs that fought with axes in that game could also have them pulled from their hands and sent right back.
In Devil May Cry 4, you can catch and throw back Credo's giant throwing spears, which not only deals a great deal of damage, but also makes him vulnerable for some time.
This trope pretty much summarizes the plot and ending of Diablo III. The attempt by Baal to corrupt the Worldstone in Lord of Destruction [unseals the powers of the Nephalem, the angel-demon hybrids from whom humanity is descended, allowing humans a chance to rise to the ancient power of their ancestors. Diablo's own plan to become the Prime Evil combined with the act of asshattery mentioned earlier gets all seven arch demons Deader than Dead.
In the backstory, Ulfric Stormcloak used an Unrelenting Force shout to gain an advantage fighting High King Torygg. If the player sides with the Imperials, you can use that same shout to finish off Ulfric.
And much further back in the backstory, according to the in-universe book series2920: The Last Year of the First Era, this trope was exploited by the Akaviri Potentate to take over the Empire. He piggy-backed on an existing assassination plot against Emperor Reman III, which was brought about by actions resulting from Reman's own paranoia.
You can pay a Pickpocketing trainer to level up your Pickpocket skill... and then further build your skill by pickpocketing the money back off them.
Fallout 3: In "You Gotta Shoot 'Em in the Head", you can non-lethally obtain the keys from the three Ghoul-haters, then take out Mr. Crowley himself with a headshot. Tenpenny rewards you for this, if he's still alive. Speaking of Tenpenny Tower, in the quest of the same name, you can arrange for the Ghouls to peacefully move in, but they change their mind and kill the residents anyway after two weeks.
In Fallout: New Vegas, completing the challenge "Talk About Being Owned" (from the Gun Runners Arsenal DLC) requires you to shoot Benny with his own gun, which he shot you with at the beginning of the game. During Old World Blues, Dr. Mobius implanted the interest in the three technologies in the Think Tank so they (or rather you) would gather them and bring them to him, so they couldn't use them to leave the Big Empty. This instead resulted in the Think Tank obtaining their designs, and getting closer than ever to escaping. At the end of Lonesome Road, if you manage to settle things peacefully with Ulysses, he finds himself forced to aid you in fighting off the army of Marked Men he originally set upon the temple to finish you off, in case he himself wouldn't succeed in killing you. There's also the option during the final battle for the Dam to have the Boomers bomb the NCR forces on your orders, when the NCR Ambassador was the one who first instructed you to go make contact with the Boomers, and probably up until that very moment thought you had secured their support for the Republic's side.
In the backstory of Dead Money, Sinclair attempted to trap Dean and Vera in the vault, but after Vera confessed to him, he changed his mind and attempted to disarm the trap, but succumbed to the poison gas cloud that was also intended to protect the casino. Elijah attempts to lure the Courier into the same trap, but if you sneak out before he comes downstairs, he will be the one trapped.
Far Cry: Instincts has Jack Carver, infected with a beast-man mutagen, face down the Mad Scientist behind the whole project. The scientist has a group of animal-human hybrids at his beck and call, and orders them to attack Jack. By this time, however, Jack's killed so many mooks and bosses that the beasts view him as the alpha, turn on the mad scientist, and tear him to shreds.
Final Fantasy games make it possible for characters (be they heroes or villains) to hurt or kill themselves by casting magic on a target with a reflective spell in effect.
Even better, many games in the series allow you to hit your own team or cure enemies.
In Final Fantasy V, Exdeath becomes absorbed by the very cosmic power he was obsessed with controlling, erasing his personality and creating a new entity that wants to completely destroy the world he devoted his existence to conquering.
Giga Wing is a well-known Bullet Hell example. "Large cluster of bullets" generally means "reflect this back at the enemy for massive damage."
In The Godfather, it's dangerously easy to hit yourself with your own Molotov Cocktail. If you don't run fast enough, your own dynamite or bomb can take you out too.
In God Hand, the tall mooks will sometimes try to grab and suplex Gene. Wriggling the left thumbstick to carry out the Action Command when prompted allows Gene to counter-suplex them for good damage. The gorilla luchador also has a move where it slams Gene into the ground, then attempts to jump on him. Hitting the Action Commands allows Gene to dodge, causing the gorilla to hurt itself more than the initial slam hurt him.
The battle with Hades in God of War III kicks off with Hades telling Kratos "Your Soul Is Mine!" and at one point early in the battle, he attempts to consume Kratos's soul using the Claws of Hades. Kratos takes the Claws away from Hades at one point during the battle, and then proceeds to use them to consume his soul in the battle's finale.
From the same game, Kratos steals Hercules' cestus and uses it to cave his skull in, and kills a giant scorpion by impaling it on its own stinger. In the second game, Theseus is stabbed through the guts with his own spear and has his head smashed in with the door he was trying to prevent Kratos from passing through, and the Barbarian King is crushed with his own hammer.
And let's not forget Kratos and Ares from the first game.
Ares: That night... I was trying to make you a great warrior!
Hoisting enemies up with their own petard is also a part of Advance Guardian Heroes' gameplay; an important technique involves blocking just as an enemy attack hits you. If it's a physical attack, enemies are simply stunned, but magic attacks get reflected back at them. Considering the difficulty level achievable by said game, countering quickly becomes a habit.
In Gunstar Heroes, the evil Emperor takes the gems to awaken an ancient weapon of destruction, only for said weapon to hit him with an energy beam from the gems, then wipe him and his army out in the final cutscene.
In Half-Life 2, the Hunters are rather weak to stuff shot with your Gravity Gun, and their main weapon shoots huge bullets. You can get an achievement by using the Gravity Gun to catch one of the bullets and shooting it at the Hunters. It is even possible to kill several of them in one shot!
In the first mission of Halo 2, the Covenant sets up you the bomb on Cairo Station, but MC turns the bomb against its setter-uppers.
On a bigger scale, the Prophets end up losing the civil war they instigate and are now likely extinct. Granted, there were mitigating factors, but still...
MC and Cortana capture a Covenant flagship in the novel Halo: First Strike and use their own weapons against them.
Gameplay-wise, this principle applies to plasma grenades. First rule of getting stuck: find the one who done it and go Action Bomb on 'em.
In Heroes of Might and MagicVI, Uriel manipulates Anastasya into killing her own father (kicking off the plot of the game) with dark magic through a comb he gave her as a gift. Once Anastasya discovers the truth and masters her powers as a Necromancer, she uses their mental connection to attack his mind. Since Uriel was currently engaged in battle with demons at the time, this leads directly to his death.
The true Big Bad of the Infinity Blade series is ultimately defeated by the one member of the race of immortals he created whose actions he could never predict. The guy even used weapons created by the Big Bad to beat him (including the sword that the Big Bad carried to their battle).
In Jade Empire, the true Big Bad, Master Li, is defeated by the last spirit monk (AKA the player character) whom he trained to overthrow the Emperor. His last words say it all:
Master Li: I'm a better teacher than I thought.
In Killer7, Curtis Blackburn is executed when Dan Smith sets off his evisceration machine, which guts him and hangs up his corpse like it did the little girls he was organ-farming.
Done in The King of Fighters '97, in the Sacred Weapons Team ending. Orochi is on the ropes, and uses his power to force Iori into the Blood Riot, commanding him to kill Kyo and Chizuru. This backfires on him when Iori grabs Orochi instead, giving Kyo and Chizuru time to finish Orochi off.
Done again in The King of Fighters XI. After you defeat The Dragon, Shion, Magaki pulls Shion into a portal and emerges for the final battle. After his defeat, Magaki opens the portal again to escape... and Shion throws a spear into his chest from inside it.
Earlier, in King's Quest III: To Heir Is Human, Gwydion uses Manannan's own spellbook, wand, and lab against him, finally trapping him in the body of a cat unable to use magic. The spell eventually robs the victim of sentience and shortens their life to that of a cat's. However, seeing as Manny was going to kill Gwydion upon coming of age, and had used that dirty trick against several of his enemies, feeding him the cat cookie was a great play of this trope.
The entire Kirby franchise falls under this, since you tend to spend almost the entire game hoisting enemies by their own petards by spitting their projectiles back at them, or copying and using their attacks against them. Particularly notable is the Miracle Matter boss in Kirby 64, a transforming 20-sided die lookalike that turns the tables and mimics the abilities you've been copying and using throughout the game, but at the same time can only be damaged by the exact same ability he's using to attack you.
In MadWorld, if a boss has a fancy weapon, chances are Jack is going to use that weapon as part of a gruesome and painful finishing move.
Also, Leo started the Death Watch competition in order to test his father's new virus and vaccine, choosing this method of testing because he was fascinated by the games and considered them to be fun. He is eventually killed by the winner of the competition, by being cut with a chainsaw and pushed off of the giant floating stadium which was where the final match had taken place. The spoilered section is not because of the death, but because of the plot.
Also, the Black Baron (the pimp that introduces the Bloodbath Challenges) is always used by his silent girlfriend to demonstrate the challenge's defining death trap. He comes back every time, of course. After the final boss fight with him, his girlfriend tosses a spike bat at his head, which Jack promptly picks up to bat the Baron flying into the dartboard used in the Man Darts challenges, just as he did to tons of mooks before.
In Mario Kart, it is incredibly easy to hit yourself with a Green Shell. What's much harder is getting them to hit your opponents.
It's also very easy to skid on your own Banana Peels, or hit your own Fake Item Boxes, especially if you've been around the track a couple of times and have forgotten where you've placed them.
In Mass Effect 2, the Heretic faction of the Geth develops a virus which they intend to use on the main collective, intending to turn them all to Reaper-worship and war against the organics. Apart from simply destroying them, you can choose to turn the same virus on them, restoring them back to the collective.
On a more thematic note, the Thanix Cannon upgrade was based on Reaper technology. Said cannon is used during the Suicide Mission to take out the Collector ship that destroyed the original Normandy, so you end up using Reaper weaponry against the Reapers' servants. For an added bit of thematic appropriateness, it's Garrus who gives you this upgrade.
There's also the Collector Rifle, a reverse-engineered Reaper weapon, that ironically proves to be highly effective at killing Collectors. Particularly ironic if you chose to use this weapon to deliver the killing blow to the Humanoid-Reaper.
Henry Lawson created Miranda to be the ultimate human biotic. If she lives, Miranda uses her biotics to throw him out the window to his death when he lets go of Oriana.
Cerberus, and the Illusive Man in particular, start screwing around with the mechanics of Indoctrination. Seeing in previous works how insidious and easily awry such things can go, it is no surprise when most of Cerberus — including the Illusive Man himself — instead get indoctrinated.
In Max Payne 3, you get several chances to shoot grenades or rockets out of the air, killing the original user in the process.
All of the Robot Masters in Mega Man 3 are weak against their own weapons.
Gate, Big Bad of Mega Man X 6, was literally struck down by Sigma, who he himself resurrected. Whether or not Gate actually survived is never elaborated, as he was either rebuilt (and forgiven) by his former colleague Alia or not, and neither X6 nor any of its sequels tell us what happened..
Also applies in gameplay, as the only way to damage him is by destroying his projectiles, making the fragments they break into hit him.
Dr. Weil of Mega Man Zero built a space satellite that will destroy any inhabitable area outside of his empire. Too bad he has a Bastard Understudy that decided to take matters into his own hands. Yet Dr. Weil survives, even though he's the prime target of the Kill Sat that was so powerful, it leveled an entire city. When he merged with Ragnarok's core to destroy Zero, he gained its weaknesses as well as its strength. As a result, when the Satellite exploded, Weil perished in the explosion, but the reason all the crap in Mega Man ZX happened was a result of various factions trying to exploit Model W — the remains of the Ragnarok satellite after it was demolished. No points for guessing who's been pulling the strings the whole time.
In Metal Gear Solid 3, Colonel Volgin, who has the ability to course electricity through his body, gets killed by a bolt of lightning. It's lampshaded with Snake saying, "Fried by a bolt of lightning, a fitting end".
It's made even more interesting in how, throughout the game, he commonly chants "Kuwabara, kuwabara", a Japanese expression meant to ward off lightning. In the final battle against him, however, when a storm rolls in, he not only neglects to say it, he outright MOCKS the lightning!
In Metal Gear Rising: Revengeance, you can trick Sundowner's backup helicopters into shooting him with their weapons, and this tactic becomes more effective as the game's difficulty goes up. Desperado (the enemy organization) suffers an example as their actions to prove Raiden to be Not So Different causes Raiden to become a even fiercer opponent against them.
Also on second runs, you can use the unlocked secondary weapons made from the bosses you've beaten. It's actually a good tactic as Mistral's pole arm allows you to hit both her and the dwarf gekkos swarming you, Monsoon's sai when allowed to charge stuns him/ knocks him out of his invulnerability state, and Sundowner's Machetes have a charge move that allows them to bypass his explosive shields.
In the Metroid Prime series, the titular Prime can only be destroyed by the very Phazon it produces. In the first game, Samus defeats it by standing in the pools of Phazon it excretes, thus activating the Hyper Beam. In the second, Samus has no compatible suit, but she can absorb motes of free-floating Phazon released by Dark Samus for the same effect. In the third, she's locked into Hypermode by the environment on Phaaze, so blasting Phazon at the enemy is pretty much all she can do. One wonders why a creature that was mutated and enhanced by, which produces, and at one point became composed of the stuff can be hurt lethally by blasts of it.
Because the substance is an incredible energy source that supercharges normal weapons. It also helps that it's been described as 'weaponized' phazon.
At this point it's safe to say that the main purpose of Samus' hyper-adaptable armorsuit is to find a way of making any gadgetry she stumbles across into implausibly devastating armaments. The grapple-beam gets replaced with industrial lifting equipment in Metroid Prime, but by Metroid Prime 3, it can be adapted to suck the life out of enemies, with a side order of paralysis. As with many examples on this page, 'overloading' something with more of whatever it likes is a popular method of Petard-Hoisting, but Samus Aran could weaponize a Brita filter.
In Might and Magic IX, the god of chaos, Njam the Meddler, has been driving the plot with the aim of entrapping Krohn, the chief god, in a shell of unbreakable frost. Guess where Njam ends up? Yup.
In Might & Magic VIII, the Regnan pirates are taking advantage of the chaos in a major way. You get to Regna by hijacking the submarine they had used to stealthily resupply one of their outposts. Once there, you sink a good chunk of the Regnan fleet while it is in harbour by means of a Regnan prototype super-cannon, intended (once they'd made a version that could fit on a ship) to ensure the Empire of the Endless Ocean's complete dominance over the seas.
The VII artifact Splitter is liable to be this. It has the Explosive Impact enchantment. See that note on the top about splash damage? That counts for Explosive Impact in this game, there are no ways to become completely immune to fire damage, and Splitter is a melee weapon, so it does splash damage to your characters every time you use it to attack something. The kicker is that artifacts and relics are supposed to differ by relics having drawbacks, but Explosive Impact counts as a boon...
In Mortal Kombat Deadly Alliance, Frost, the pupil of Sub-Zero, only wishes to train with her master so she could obtain the same power he has with his Amulet. However, when she finally gets her hands on it, she gets consumed by her own ice abilities due to her lacking the same discipline Sub-Zero has.
In The Neverhood, Klogg, after killing Willie Trombone with the giant cannon, gets this when he steps on the cannon's remote as he tries to stab Hoborg from behind, causing the cannon to fire wildly. Naturally, it hits Klogg in the face.
In Neverwinter Nights 2: Mask of The Betrayer, Myrkul is either given eternal rest by the spirit eater, or devoured by him, depending on the player's choice. The spirit eater is Myrkul's own creation, and for extra irony, the existence of the spirit eater was intended to give him immortality by abusing Gods Need Prayer Badly and ensuring he always had at least one person remember him. This is lampshaded with his last words, "A final irony, even in this." (The player can take a third option ensuring he fades away, but where is the fun in that?)
Osmos centers around controlling a primordial cell and absorbing other cells around yourself. The only way to move is by ejecting pieces of your own cell in opposite direction to where you’re going, propelling it through inertia. It is thus entirely possible to lose too much mass in this way and get absorbed by the very cell you were trying to move to.
For extra irony, it’s also possible to have those tiny pieces absorbed by a cell that was smaller than you before, but becomes just larger than you are and proceeds to absorb you.
The final boss in Painkiller is Lucifer, but he is a Puzzle Boss who cannot be directly shot to death. Instead, you have to deflect his thrown sword back to him.
In Pikmin 2, a new enemy called the Decorated Cannon Beetle shoots magnetic boulders, which consequently home in on the current captain. It's entirely possible to manipulate the boulders into hitting the Cannon Beetle or other enemies in the area. See Misguided Missile.
Drinking unidentified potions. Drinking a Potion of Paralytic Gas turns you into helpless prey that will be killed by the first weak enemy that happens to wander in the vicinity. Drinking a Potion of Toxic Gas is usually not lethal if you run quick enough but will nevertheless leave you at the center of a quickly expanding gas of deadly poison. There are no such saves for drinking a Potion of Liquid Fire.
The same goes with scrolls, although most of them are harmless and just useless if read in the wrong context. Reading a Scroll of Challenge, however, is almost always a bad idea unless you really know what you're trying to do.
The Wand of Lightning can hurt you if used at close range. The Wand of Firebolt is insanely powerful, and effortlessly cutting through hordes of enemies while burning half the level is fun, but you will usually end up miscalculating the consequences and burning yourself to death. Potions of Liquid Flame and Blazing weapons are safer, but can occasionally have dramatic consequences if you are careless (for example, don't use them in a room full of vegetation).
Pokémon that can use Explosion and Selfdestruct. Funnier if the opponent uses Protect or is a Ghost-type.
Hi Jump Kick is a powerful move, but if it misses, it hurts the user. Guess what happens if you miss with too little HP. Taken Up to Eleven in Generation V, where the user takes one half of its maximum HP if it misses.
An interesting case of hoisting by other's own petards are Dragon-type and Ghost-type Pokémon, which are weak to their own type. Giratina takes this Up to Eleven, by being both a Dragon and a Ghost type.
The ability Synchronize also transfers Poison, Paralysis, and Burn if they were inflicted with that status themselves. A Pokémon with the ability Guts also has its attack boosted when it has a status effect, but competitively, it's mostly self-inflicted.
The move Magic Coat and the new Dream World ability Magic Bounce/Magic Mirror negates Status moves and entry hazards, then throws such effects back at the opponent. You can essentially make them status cripple themselves and get their hazards on their side.
Counterattack moves such as Counter, Mirror Coat, and Metal Burst (where the user deals back two/1.5 times the damage, respectively, that the user has sustained from the target's attack of the same turn) can invoke this trope when the target has used a particularly powerful offensive move, especially if the user is wearing a Focus Sash or possesses the Sturdy abilitynote both of which, provided that the Pokémon in question is at full health, allow a Pokémon to retain one Hit Point and survive what would normally be a one-hit knockout move. However, prior to Generation V, Sturdy's effect was limited in that it only provided immunity to moves that were specifically designated in text as one-hit knockout (OHKO) moves (such as Fissure, Guillotine, and Sheer Cold), although no damage at all would be taken from said OHKO attacks.
The moves Mirror Move, Copycat (the user uses the move last used by the target), and Snatch (the user steals the effects of the status move used by the target, usually a healing or stat-changing move) can occasionally lead to this trope. Better yet is the priority version of the first, Me First, which lets the user make the attack the opponent is about to make.
Need to take out Giratina, but only have a lousy Klefki? Well, with Foul Play, a 95 Power Dark move that calculates damage based on the victim's Attack stat and buffs, you just might be able to.
The Big Bad of Radiant Historia put a great deal of effort into trying to enlist his nephew to help him destroy the world. Everything he did towards this end... did not go as planned. Kidnapping and mind-wiping him got him away from his Royally Screwed Up family and let him live as his own person instead of as a Living MacGuffin. Enlisting him in the army and later giving him subordinates led him to attract a group of True Companions. Training him as a spy made him a good enough liar to fool said Big Bad about how much he knew, giving him more time to act on his own. All of this wound up coming together so that the person he wanted to make into a Dark Messiah turned into a true All-Loving Hero instead. And in the end he even sacrifices himself to save his nephew because he loved him too much to let him die.
In the MMORPG Ragnarok Online, the 3rd Job Class Warlock has a skill called Chain Lightning, which bounces off of enemies. It's quite powerful, but the thing is, if no enemies are left, the Chain Lightning will bounce back on you, even in non Player Versus Player maps. Made funnier by the irony that the passive skill Soul Drain works on yourself if you get killed by your own Chain Lightning.
Monks/Champions will never use Extremity Fist on Crusaders/Paladins pre-Renewal. Reflect Shield: 40% damage back to you: a 75000 damage Extremity Fist will give the Champion 30000 to himself.
Ratatouille had crabs hiding under saucepans, who would steal anything Remi carried in his paws. The way to dispatch them was to let them steal a bomb from you, thus finishing them off. A pity same trick didn’t work on crabs out in the open.
Ratchet & Clank: At the end of the first game, the eponymous duo sends Drek onto his artificial planet and then destroy it with the laser he intended to destroy Veldin with.
Wesker is gored by the Tyrant he releases in Resident Evil (This is later retconned to make it his plan.)
Carter is killed by the Tyrant he releases in Resident Evil: Outbreak File #2.
The canon route for Resident Evil: Survivor has Vincent Goldman killed by the Tyrant he releases.
Ozwell Spencer is murdered by Wesker, the man he genetically engineered to make into a god.
Rom HackRockman 4 Minus Infinity has the Toad Spell, which is two of the bosses' weakness. It turned the debris Dust Man inhaled into toads which damage him when he inhales it in. It also turned Toad Man, who also used it, into a easy to squish toad.
The Plague Quest series begins with a handful of short, easy quests where you do various odd jobs for King Lathas of Ardougne helping the people of his city. You later find out that Lathas is a Mole in Charge working for the Dark Elves, and you've just helped him with the first couple steps needed to summon the Eldritch Abomination worshiped by the latter. Come the Grand Finale, you uncover proof that the final step is the wholesale massacre of the poor section of the city, and that Lathas is complicit in this; when you break the news to the citizenry, you've already done so many good deeds for them they they're more than happy to believe you over Lathas.
In the Sam & Max: Freelance Police game episode "The Tomb of Sammun-Mak", Jurgen discovers he's under a vampire curse and outfits his room on the train with loads of anti-vampire gear. However, he also won't allow Sameth and Maximus to search his room for an important item. What they have to do is get Jurgen bitten by a vampire and turned into one. This time, when Sameth and Maximus search his room, he's unable to stop them due to the anti-vampire gear he himself put there.
In SD Gundam Capsule Fighter, there are two skills designed for maximum Hoisting of One's Petard for going after them: the Unicorn Gundam (NT-D Mode) and the Akatsuki (Oowashi and Shiranui packs). The Unicorn's NT-D Mode functions the same way the one in the anime does: by taking over your Funnels and throwing them right back at you. The Akatsuki has the skill "Yata no Kagami", which activates its beam-reflecting armor. Unlike the anime, this one reflects it back at you all the time.
In Silent Hill 1, Dahlia gets fried by the very god she was trying to summon (though she was already mortally wounded by Kaufmann’s gun). Kaufman, if you saved him earlier, gets dragged to hell by Lisa, the nurse he has abused and who was killed because of the local apocalypse he has helped cause. Of course, if you don’t save him, then he’s killed by a monster from the very same apocalypse that wouldn’t have happened without his assistance.
Done rather bizarrely in Silent Hill 2, when the twin Pyramid Heads will commit suicide on their own weapons once James comes to terms with the truth.
In Silent Hill 3, Vincent insults Claudia at an inopportune moment and earns a knife in the back.
Emphasizing the above example, he turns his back toward Claudia as he tells Heather, who is on his other side, to kill Claudia, who has just hinted (and he seems to get it) that she is willing to kill him if he gets in her way, which seems to guarantee she'd be willing to kill him if he actually tries to go so far as to kill her, which is exactly what he's indirectly trying to do through Heather. He so much brought about his own death that Claudia's action could almost be justified as self-defense, if we didn't know she probably had the situation well under control and didn't have to fear anything from Vincent's threat.
And in Silent Hill 4, Andrew DeSalvo is locked into a cell of the prison where he'd acted as its sadistic warden, and later brutally murdered by one of its prisoners, Walter Sullivan.
In Sonic Generations, when you fight Silver the Hedgehog, he tries to squish Sonic with a giant ball of debris when he's down to his last hit. When Sonic hits him, he's knocked into the ground and promptly ran over.
Even better: The operation was supported by the Awesome, yet ImpracticalOdin that Mengsk commissioned as a publicity stunt and was being piloted by Tychus Findley whom Mengsk himself released and sent to Raynor as The Mole to assassinate Kerrigan.
In StarCraft, the Confederacy used the psi-emitters to lure the Zerg onto their enemies. Sons of Korhal later use those psi-emitters to draw the Zerg into attacking the Confederacy.
The unofficial expansion/modpack Huncraft ends with Duran mocking the now infested Raynor, and detonating him. Before exploding, Raynor runs up to Duran and the explosion kills them both.
In Star Wars Battlefront, infantry trying to destroy a tank often throw grenades that stick to it. You can drive this tank up to them so that they're right next to their own grenade when it explodes – making this a literal case of Hoist by His Own Petard.
In Mabinogi, this trope is invoked to make An Ice Person show up within Par Ruins. The boss' Stomp skill makes it drop Ice Poles, which you have to use on it.
Many of the bosses/villains in the Super Mario Bros. series. Indeed, you defeat Giga Lakitu and Megahammer by firing their projectiles back at them (Spinies and Bullet Bills respectively), as well as King Kaliente and Prince Pikante by sending back the coconuts fired in Super Mario Galaxy and its sequel.
Bowser's plots in those two games to create an "evil empire" are above his station and full of flaws, but the biggest monkey wrench to his plans is holding Princess Peach in his clutches, as he wants her to rule alongside him. While it used to help the trouble he caused in the classic Super Mario games remain intact, as Princess Peach was the only one who could break the spells keeping her people under Bowser's sway, now it does nothing but increase Mario's chance of foiling Bowser's self-deluded, inevitably doomed plots.
In the Mario & Luigi series, many enemy attacks could be countered by sending their own attacks back to them.
In Luigi's Mansion, one of the portrait ghosts, Slim Bankshot, is a billiards master. He'll shoot billiards around the room when you enter, and very rarely, one of them will hit him as he walks around the table. You're supposed to suck up the balls and shoot them back at him, though, so it counts either way.
In Super Robot Wars, Wilhelm von Juergen committed a mistake by putting Lamia Loveless into the core of ODE. Not only does this slow down her assimilation because she's not a complete human, her willpower causes her to refuse being assimilated and pretty much wrecks the harmonious order of Bartolls (this is signified in the game with a very high morale drop). It is no wonder that it tried rectifying things by doing a Player Punch.
In Syndicate 2012, you must Breach the missiles Agent Ramon fires at you, turning them against him.
Toyed with in any game where one can rocket jump, Team Fortress 2 for example, where one is literally hoisted by one's own explosive weapon. Of course, if your health is too low, your corpse (or giblets) will be making the landing.
Engineers can be killed by their own sentry guns if they get between the sentry and its target.
Also, Pyros can airblast several of the projectiles in the game back at the person who shot them (or anybody else, for that matter). This comes with a Mini-Crit effect, making skilled Pyros exceptionally dangerous if you're a Soldier or Demoman. And in rare cases, a Sniper with a Huntsman.
Tekken: When Kazuya Mishima was a kid, his father, Heihachi, tossed him into a ravine so he would man up. He managed to survive and climb out after making a Deal with the Devil, and defeated Heihachi in the first game, then proceeded to throw his father down the same ravine.
The Big Bad of Thief II: The Metal Age dies in classic Bond-Villain fashion when Garrett recalls his poison-gas robots to his citadel. When the Citadel is sealed off, the robots and the gas are trapped inside, rather than rampaging through the local ecosystem while Karras stayed safe and sound.
Tron 2.0: The Terrible Trio of Corrupt Corporate Executives wanted to learn the secrets of digitization in order to shoot a bunch of mercenaries into Cyberspace and Take Over the World. They decide to test this by shooting in Alan, and then having the Datawraiths use him for target practice. However, things rapidly go south from there, seeing as it reunites him with his son, they find a critical flaw in F-con's systems, and are able to de-bug Ma3a to get home. The trio's last ditch effort to digitize themselves in order to stop the Bradleys ends up with them undergoing Body Horror and transforming into a twisted abomination that Jet defeats and Alan traps on a hard disk.
Viking: Battle for Asgard: Freya would have probably lived and managed to avoid screwing over the entire pantheon if she had just lived up to her promise to free Skarin so he could earn entry into Valhalla.
In Wild Arms, the demon Berserk lures the heroes into some ruins that happen to have a device that amplifies a demon's powers, with the intent of taking out the heroes with the increased power. Unfortunately for him, a rather trigger happy ally of the heroes happens to be in the same room as the device that controls the amplifier, and proceeds to break the crap out of it (despite not knowing what it does). The result: Berserk actually gets WEAKER, allowing the humans to defeat him. As is typical with this trope, he didn't even NEED the power boost; Berserk was more than strong enough to take them as he was, having toyed with them in the previous encounter(s) with him. Had he fought them elsewhere and seriously, he would've killed them easily.
In World of Warcraft, one of the bosses in the Stratholm instance has an enrage timer that can be beaten ONLY by having a character pick up his dropped sword (which did much more damage than most weapons available at that level) and using it on him.
Similarly, in the Tempest Keep version of the Kael'thas fight, the weapons dropped by the dead advisers are practically required to defeat him.
In the Drakuru quest chain in Zul'Drak, you are sent in a ghoul disguise to lure the chieftains of the Drakkari out so they can be captured and turned into magically-enhanced behemoths. During this quest, he gives you a scepter that you use to control his abominations to kill the Drakkari mooks, which, after you gain his trust, you use to enter his weapons room where the chieftains are being mutated, and then to control one of them to battle him with.
In the fight against Halfus Wyrmbreaker in the Bastion of Twilight, the players generally need to free the dragons he has imprisoned and defeat them after he bends them to his will in order to counter his abilities (for example, making the Proto-Behemoth's breath do less damage or making his Shadow Novas take long enough to cast that they can be interrupted), and give him a damage buff that will enable you to beat his enrage timer.
Several achievements require you to trick bosses into killing their own adds with their area of effect abilities.
In Mists of Pandaria's Mogu'shan Palace dungeon, the party has the opportunity to turn Xin the Weaponmaster's own weapon system on him.
In the X-Universe games, missiles detonate if shot. NEVER launch any missile that has an area of effect feature in it when you're being fired upon unless you want to lose a lot of shields to your own stupidity. This is especially true if you're carrying Firestorm or Hammerhead missiles, considering how vastly powerful and slow their warheads are. Unless you're flying a frigate-, carrier-, or destroyer-class ship, you WILL die in the ensuing shockwave if your missile gets shot at. Amusingly, you can do this to an enemy ship's missile too when they're ready to launch. Enemy bombers are especially prone to this since their missiles do more damage than the ship has shields and armor put together, and missiles are the only offensive weapons they have.
In pretty much any Super Mario Bros. game, there will be at least one boss fight which can only by won by exploiting a key element that's right there in the boss fight room, sometimes because the boss is actively utilizing it against you. The best example is probably stunning the Mecha-Koopas Bowser tosses at you at the end of Super Mario World so you can throw them back at him.
In The Adventures of Lomax, the game's final boss, Evil Ed, causes boulders to appear on the stage. You need to throw them at him in order to defeat him.
There is an achievement in XCOM: Enemy Unknown for mind-controlling an Ethereal. Fittingly, it's called "Xavier". It's very difficult, but can temporarily grant you the Ethereal's impressive array of Psychic Powers, some of which are beyond your psi-soldiers. And yes, nothing prevents you from ordering him to put a Rift right next to him, which will deal tons of damage to him every turn, or blast one of his own Muton Elite bodyguards with a Psychic Lance.