Tomb Raider (2013): Dr. Whitman makes a deal with Father Mathias and his cult to deliver Sam to them, betraying Lara and the remaining Endurance crew, so that they can complete their sacrificial ritual and escape Yamatai. He is also firmly convinced that he is the one playing Mathias here, planning to slip away and escape as the ritual is being performed, only to return later with the authorities as the Fake Ultimate Hero. Mathiasinstead lures Whitman to his death at the hands of the Stormguard to serve as a distraction for Mathias to slip past with Sam as he's being torn apart.
In Warhammer 40,000: Dawn of War: Dark Crusade, during the Imperial Guard stronghold assault, the Guard's Fifth Company can be turned rogue and allied to the attackers' faction by killing their Commissar. After the battle, if you were playing as the Space Marines, you see the Marines sending the survivors back to Segmentum Command, with a request to their superiors to not punish the Guardsmen because they followed their orders and fought with honor... except Fifth Company, who the Marines summarily execute for treason. Ironic, isn't it?
Also occurs in vanilla Dawn of War's campaign. Said traitor (Isiador) steals the MacGuffin from right under the other space marines' noses, only to have the Big Bad immediately take the item for himself and leave the traitor and his marines to guard the rear. Meaning he has to face the very angry Force Commander/former best friend he had just betrayed. Needless to say, he doesn't last long.
The Operation Flashpoint expansion, Resistance, has an alternate ending (though it occurs after the 3rd mission) where you betray the Resistance to the Russians. Immediately afterwards, you and the remaining Resistance members who have been captured are taken to the General, who orders the prisoners execution. As they are being lined up, a officer asks about your character — he orders that you be executed as well, because you are seen as 100% untrustworthy.
In the Novalogic game Delta Force: Land Warrior, your first mission takes place on a training course surrounded entirely by friendly soldiers carrying out exercises. If you kill more than one of these soldiers (because one could simply be an accident), every single soldier on the training field will turn on you and try to kill you.
Instructor: You, my friend, are a maniac! You have just made yourself a target for every man on this installation! Good luck, sweetheart!
In Fire Emblem: Path of Radiance, the half-cowardly, half-Apathetic Citizens of a port town inform the Daein soldiers about which boat Ike and his company took. When they ask for their reward, they are told that it was their country's own princess in that company that they just sold out. Just as the realization and guilt really begin to sink in, the captain of the soldiers has the "dastards" taken away to be worked to the bone, a "fitting reward" for people who would sell out their own princess.
In Fire Emblem Awakening, the Hierarch of Ylisse, who Chrom had known for years and who had helped Emmeryn run the kingdom during the early years of her rule, sells them out to the Plegians while they're evacuating Emmeryn to safety. Once the ambush begins, the very first thing the enemy leader does is kill the Hierarch, outright telling him that his orders were to protect a man, not a "pig" who sold out his own sovereign.
In Radiant Historia, King Garland of Cygnis' Jerkass advisor betrays the country to the enemy after being banished, and is rewarded like this. ("After he spilled his guts he, well, spilled his guts.") Unusually for most examples here, you actually have to go back in time and prevent his death in order to progress, since him selling you out leads to the king being fataly wounded in the next battle. Stocke talks him out of betraying you by convincing him he'll suffer this fate if he does, and he promptly agrees.
In Prince of Persia: The Sands of Time, the Prince regrets that his father did not give the Vizier this treatment, as he betrays them almost immediately after betraying his former liege and joining them.
From the Point Lookout DLC, a question from a Brain in a Jar: What is the greatest thing man can acquire? Answer 1: Something that I'll give to you if you backstab your ghoul partner. Answer 2: Death. Said brain betrayed the ghoul back when they were still human, so genre savvy players will recognize that one insane (read: lobotomized) vault dweller versus a brain in a jar and a small army of robots with frickin lazer beams is very less likely to win than one insane vault dweller and one experienced robot scientist versus a brain in a jar and a small army of robots with frickin lazer beams. Hence the backstabbing.
Also occurs in Fallout: New Vegas, though not with you. Caesar's Legion was offered a deal by the town of Nipton: in exchange for a sum of caps, the mayor would round up NCR troops and Powder Gangers inside the town and trap them. The Legion captures everyone - including those who were helping - and plays a game with them. It helps that Nipton was a Wretched Hive and the mayor was an unscrupulous jerk, though most people consider this their Moral Event Horizon, given the brutality of the Legion.
At one point in the PC game Spycraft: The Great Game, the villains approach you with the offer of joining their organization. If you accept you're tasked with assassinating the President of the United States. Regardless of whether or not you do it you're then killed by another assassin as payback for arresting his girlfriend earlier.
Blood Storm kicks off with the High Emperor getting assassinated, and all eight fighters are pointing fingers at each other. If Tempest wins, she accidentally lets slip that she released the Big Bad and ordered her father's execution. She is promptly overrun by an angry mob and beheaded.
In AdventureQuest Worlds, if you make the choice to betray and kill Artix during the finale of the Doomwood saga, Vordred "rewards" you by making you the very first of his new undead minions as he unleashes a Zombie Apocalypse upon Lore.
Implied in Grand Theft Auto IV, Playboy X and Dwayne are longtime friends. When Dwayne returns from prison a sullen man, eventually the two butt heads to the point where Niko needs to kill one to continue the plot. If the player kills Dwayne, Playboy calls him up and wires a large amount of money, but tells him that he has to try to kill Niko if they ever see each other again (They don't).
A more likely explanation is that Playboy X doesn't want anyone else to know of his involvement in Dwayne's death, as it would be really fishy for him to not try to kill the murderer of his "best friend".
In the Dark Brotherhood questline of The Elder Scrolls V: Skyrim, Commander Maro launches an attack on the Dark Brotherhood Sanctuary after Astrid arranges for you (the killer of his son) to be captured by him. The fact that she was the one who ordered the kill is definitely a factor in this.
Planescape: Torment has a meta-example in the Fourth Circle of Zerthimon: According to the passage, in the middle of a Githzerai uprising, a Githzerai named Vilquar voluntarily warns the illithids and feeds them as much intelligence as he can. They kill him the instant they feel their victory is assured.
Averted by Gwyn in Dark Souls. After Seath the Scaleless betrayed his fellow Dragons, Gwyn rewarded Seath by making him a Duke. This did not sit well with Gwyn's bishop Havel the Rock, who hated Seath and the sorcery that Seath created.
inFAMOUS: Second Son: Hank Daughtry makes a deal with Brooke Augustine, luring Delsin and Reggie into a trap in exchange for his freedom, which results in Reggie's death. Afterwards, Hank finds himself dealing with an especially anti-Conduit D.U.P. officer, who has no intention of honoring Hank's deal with Augustine and fully intends to just kill him; of course, it's entirely up to the player whether or not Hank lives.
Resident Evil: Revelations 2: Neil Fisher sells several members of Terra Save, including Claire Redfield, out to Alex Wesker as part of a plan to obtain a sample of the Uroboros virus and revive the FBC. When all is said and done, Alex gives Neil the Uroboros sample he wanted... by deliberately infecting him with it, turning him into a monster that Claire has to put down.
In Jade Empire, during the Empire's siege of the spirit monk's monastery of Dirge, a group of younger spirit monks sabotage the defense with the expectation of reward. Instead, after the other spirit monks are killed, the Emperor has them executed as well and binds their spirits to a fountain to prevent anyone from restoring Dirge. Your spirit companion makes this clear this is effectively a Fate Worse Than Death.
In the backstory to Kult: Heretic Kingdoms, a warlord controlling a key rebel fortress sold out to the God-Empress who was trying to suppress the rebellion, but was then executed due to the God-Empress's contempt for traitors.
Roland, in Borderlands 2, was one of the major characters who betrayed Handsome Jack in Borderlands: The Pre-Sequel!, who unfortunately was also the most reluctant of the three, with Lilith and Moxxi who gets away with turning Jack into Handsome Jack and the result of his rampage on Pandora.
Borderlands: The Pre-Sequel!, again, gets a very justifiable one. The Meriff betrays Jack in person after a few seconds the latter outright lets him go, by shooting him in the back with a revolver and missesnote Forgets that he had only One Bullet Left, surrounded by Vault Hunters, being a poor shot and failed to realize the standards of carrying a bulletproof shield in space.. Thus concluded in getting shot in the face several times while giving Jack a lesson to never trust anyone.
Boles, The Joker's inside man in Batman: Arkham Asylum, meets his end this way after he killed several of his fellow guards to help Harley take the Commissioner hostage, he is found strapped to a stretcher and apparently gassed to death, because of this and he had they had no more need for him. Though considering this is The Joker we are talking about, it was probably just as much For the Evulz.
In the Kill 'em All route of Undertale, Flowey enthusiastically supports your massacre of monsterkind throughout the game... all the way up until he realizes he's next. He then rushes off to warn King Asgore of your arrival. Unfortunately, Asgore is still no match for you, and you take him down with ease — and then Flowey hurriedly finishes Asgore off for you to prove he "can be useful" and tries to claim he was never really going to turn against you. It doesn't save him.
In Touhou, there's a subtle implication that the abuse Reisen endures from the other residents of Eientei is karmic punishment for her going AWOL and fleeing the moon during the Earth-Lunarian War note Making matters worse, Word of God has flip-flopped on whether this was a real war or if the Lunarians took the Apollo 11 landing as an invasion attempt and freaked out. The other part of it is karma for her being a Space Elf, complete with the requisite arrogance.
In Elite:Dangerous, after the assassination of Emperor Hengist Duval, the group behind the event, Emperor's Dawn, fled and established a base of operation into Federation space, possibly thinking they would have safe haven. President Hudson sent a fleet to clear them all.
President Zachary Hudson : Perhaps the terrorists think our distaste for the Empire is so great, we will tolerate their presence in our space. Perhaps they thought we simply wouldn't notice their incursion. In any case, they are wrong, and they have made a costly mistake. We will mete out such punishment that the very fires of hell will seem but guttering candles in comparison. Emperor's Dawn is about to learn what it means to cross the Federation.