When a character decides to sacrifice himself or herself in order to save their friends or the world, but knew perfectly well that the opportunity to do so would occur. Sometimes, they even plan out the situation so that their own friends will end up killing them.
Maybe they're an Apocalypse Maiden, Woobie, Destroyer of Worlds or Person of Mass Destruction. Maybe they committed a horrible crime and could never get it out of their mind. Maybe they're just a Death Seeker, and this seems like a good enough opportunity. Or maybe they somehow know that their death is just a level up. Either way, they're convinced that their death will make things better, whether it be for them or their friends. Just before they die, the good guys usually discover his ploy and begin to panic, one of them usually saying "You planned this all along, didn't you?"
This trope is specifically about one character that believes their death will make things better and tries to go through with it - not about someone who decides to take others with them when they die.
Related to Thanatos Gambit, Driven to Suicide and Heroic Sacrifice. If the character uses a spell to sacrifice themselves, it's a Sacrificial Revival Spell. A specific variant is One-Way Trip. When a character has died long before and is revealed to have done one of these, they're a Silent Scapegoat.
Being a Death Trope, BEWARE OF SPOILERS!
- Attack on Titan reveals this to be the ultimate goal of Eren Jaeger. While Eren was willing to kill off all humanity outside of the island of Paradis, he also banked on his friends being against his actions and planning to stop him. After Eren's death, publically proclaimed to have been done by Armin, he and the rest of the Paradis squad would be considered the heroes of humanity and it would lead to world peace between the Eldians and Marleyans. The final pages do show that it succeeded, albeit for only a generation or two, until Marley retaliated upon Paradis again.
- Near the end of Code Geass Lelouch, having lost his will to live on in the world after Nunnally's perceived demise and the Black Knights' betrayal, attempts this twice: first by locking himself together with his father, the Emperor, in C's World, and after that doesn't take, by taking over the world and becomes an oppressive dictator who violates human rights like he's going for a world record. Then his (former) friend assassinates him publicly and becomes a hero to literally the entire world for freeing them from Lelouch. Little do they know, it was his plan. By uniting the world under his friend, Lelouch ushers in world peace.
- This was pulled by Urumiya Hagas in Fushigi Yuugi: Genbu Kaiden. Not only he was already dying of illness, but he knew that only either he or his twin brother Tegu would be able to have the Urumiya title among the Genbu Senshi... so as soon as he was in front of his brother after years, he shielded Tegu from a falling stalactite and was fatally injured to protect him. With his last words, Hagas told Tegu everything and entrusted him with the legacy of Urumiya, which he fulfilled to his best.
- In Moriarty the Patriot, as part of William's Messiah complex, he had long planned his own death as a sacrifice to take on the burdens on his entire family and friends' crimes and save Britain. Unfortunately, no one else realized this until nearly too late to stop it.
- Nabari no Ou: Raikou tells Gau that he'd kill him if Raimei was told the truth about their clan's annihilation. Gau decides that it's worth it.
- This was part of Itachi's plan to protect Sasuke and make him stronger.
- In a flashback arc, a Konoha girl named Rin Nohara was captured by the Mist Village and forcibly made into the jinchuuriki of the Three-Tailed Beast, with the intent that she return to Konoha, lose control, and destroy the village. To prevent this, she threw herself in front of her friend and Unrequited Love Kakashi's chidori, effectively killing herself.
- In PandoraHearts, Alice and Oz plan to have themselves destroyed in order to prevent The End of the World as We Know It. Unwillingly, Gil allows them to go through with it, taking solace in the fact that they will be reborn after one hundred years.
- In the movie sequel of Rascal Does Not Dream of Bunny Girl Senpai, it is revealed that Mai had already planned to sacrifice herself to save Sakuta ever since the day future Shoko told her of his upcoming death.
Future Sakuta: Mai-san, you intended on saving me from the beginning?
Mai: Didn't I tell you before? I love you way more than you think.
- Saint Seiya: Shun comes up with this when he was possessed by Hades. However, his plan was averted due to his brother Ikki not willing to bring himself to kill his brother.
- In Tokyo Ghoul:Re, these pile up.
- Kaneki betrays the CCG by releasing numerous prisoners inside Cochlea, using it as a distraction to rescue Hinami. Though he reassures her, in reality he intends to "die in style" — dying for the sake of another person. His plan focuses on saving Hinami's life in a manner that will provoke Arima into killing him.
- Arima turns out to have been planning a similar event, having groomed and trained Kaneki to one day kill him in battle. When Kaneki ultimately refuses to do so, Arima commits suicide and requests that Kaneki take credit for his death.
- Yu-Gi-Oh! VRAINS: A rogue Ai pulled this off to prevent the possibility of Yusakus death by pretending to become evil and an enemy to humanity in addition to taking several people hostage to give Yusaku Fujiki no choice but to kill his friend Ai.
- In Brian K. Vaughan's last arc on Runaways, Chase brokers a deal offering up his own life to the Gibborim in exchange for Gert being resurrected. Of course, since this is Chase we're talking about, the Gibborim aren't much interested in his life and instead try to take Nico, forcing the Runaways into a Curb Stomp Cushion battle that nearly kills them all.
- Tangled Up In Blues: Blues believes this was Moody's gambit—though it did not involve sacrificing a life, just his fame and fortune, so that he could one day become a mentor to some young pony in need of guidance.
- In Gran Torino, Clint Eastwood's character hatches a plan to get the gangsters who attacked his Hmong neighbors put away for a long time for their rape of the girl among said neighbors...by making sure there will be witnesses when said gangsters murder him.
- Harry and Aberforth Dumbledore discuss the morality of this being Dumbledore's plan to defeat Voldemort. Harry figured it would and is willing to go through with it. Aberforth calls it a fool's crusade, but he doesn't stop Harry from going back to Hogwarts. Even after discovering his status as a Horcrux, a vessel for a broken piece of Voldemort's soul and thereby means by which Voldemort might live forever, Harry accepts his fate solemnly.
- Katniss Everdeen's goal in The Hunger Games: Catching Fire is to save Peeta at the cost of her own life and she's well aware that by martyring herself she might be of better use to the rebellion than if she lives.
- In Stargate, Jack O'Neil reveals toward the end that the reason why they brought a nuclear bomb with them was so he could detonate it and destroy the Stargate from the other end in case they encountered a hostile world that wished Earth harm. The reason he's willing to nuke himself? His son accidentally killed himself with his gun and he spends the whole film dealing with it.
- Of course, Jesus.
- In the last book of the Deptford Mice trilogy, the Starwife goes outside into a snowstorm and ritualistically freezes herself to death. Her body is found and burned in a pyre. Afterward, a magical snowdrop flower grows on that very spot. It is later used by Audrey to defeat Big Bad Jupiter once and for all.
- In Dragon Bones, Oreg manipulates things so that Ward has no other choice than to kill him, in order to make castle Hurog collapse over their enemies.
- Leto Atreides II in the Dune series. Most of humanity wants him dead for various reasons, but his prescient scrying keeps him one step ahead of their plans. Trouble is, his goal all along has been to breed a strain of humanity that's immune to prescient scrying (in order to prevent its extinction from a separate threat he's perceived), and getting that done will inevitably result in his destruction.
- Dumbledore's plot to have Snape kill him in Harry Potter. It was the only way Snape could gain Voldemort's full trust.
- In the second book of The Hunger Games trilogy, Katniss goes into the Quarter Quell fully intending to protect Peeta for as long as possible, die, and let him win and survive, both because she feels that she owes him (since he and Haymitch worked to keep her alive in the previous Hunger Games) and because she thinks he would be more useful in uniting the rebels and aiding the revolution against the Capitol. As it turns out, the rebels manage to get both of them, along with a few others, out of the arena alive.
- Peeta, on his end, volunteers to go into the arena so he can protect Katniss to the point of sacrificing his own life. He even brings a locket with pictures of Gale and her family as his district token and gives it to her on the beach to convince her that she can have a happy life without him but if she's gone he has no reason to live.
- Kelsier gets one of these at the end of the first Mistborn novel - planning to make himself appear godlike by allowing a shapeshifter to take his place after being very obviously killed in battle.
- The Bittersweet Ending of the second Nightrunner book had one. At the climax, it's revealed that Nysander, the only one who knew the full prophecy, has to die in order for the Artifact of Doom to be destroyed. He knew this all along and set up Seregil to kill him. Cue Heroic BSoD on Seregil realizing this.
- A lot of the more sympathetic Sith in Star Wars Legends try to grasp at power so that the current government will be stronger for defeating them.
- A Tale of Two Cities: Sydney Carton.
- In The Vampire Diaries Elena makes a bargain with Elijah, with him carefully phrasing the agreement to exclude her. It turns out the specific terms were noted and accepted anyway.
- In the revived Dallas series, the death of J.R. Ewing (brought on, of course, by the death of Larry Hagman) sparked a turbulent series of events involving Ewing Energies and Barnes Global. It was later revealed that J.R., already crippled by illness and knowing he had only a few days left to live, had one of his henchmen shoot him dead.
- In Supernatural, season five ends with Sam following through on one of these to lock up Lucifer.
- Battle for Wesnoth: Prior to the final battle in The Rise of Wesnoth, Haldric concocts a scheme to forge a treaty stating that Haldric gave the Ruby of Fire to the elves. Haldric then will let the Big Bad Jevyan kill him and read the treaty so that the orcs would go after the elves instead once Jevyan is destroyed. Aethyr convinces Haldric to let him take Haldric's position since he is a Death Seeker with no future once the Jevyan is dealt with.
- Bloodborne: This is the exact reason why Gehrman chose to kill the Hunter in the end. He decided to stay inside the dream as a surrogate of the Moon Presence so the Hunter can be freed from the dream by giving him/her a Mercy Kill. Moreover, it's implied in one of the endings, dialogue with the NPC hunters Djura and Eileen, and Gehrman's tear-filled sleep talk that he has been doing this hundreds of times. This can be inverted as well, if you decided to refuse Gehrman's offer. In that case, you choose to sacrifice your freedom and take Gehrman's place in the Hunter's Dream.
- Dragon Age: Origins: All Grey Wardens know that to kill an Archdemon requires the sacrifice of the life of the one that kills it. If Alistair is in your party, provided you didn't take part in the Dark Ritual, he will always sacrifice himself to save the life of the PC Warden.
- On the other hand, the PC Warden can invoke this trope by purposefully leaving Alistair in the city so they are the one to make the sacrifice and spare his life.
- Final Fantasy:
- Final Fantasy XIII-2: Serah finds out that saving the timeline would have side effects due to her seeress abilities, but goes ahead anyway. Guess what happens after the Big Bad is defeated.
- Lightning Returns: Final Fantasy XIII: Lightnings entire reason for being brought back from crystal stasis was so she could be groomed to become the new Goddess of Death. She figures the plan out pretty quickly and decided its a Foregone Conclusion that she needs to sacrifice herself for the sake of all of humanity. Most of her friends are pretty nonchalant about it, but Hope is the only one to panic and try to talk her out of it. It's only through regaining her emotions that Lightning realizes she doesn't want to do this. Fortunately, her pleas are heard, and Hope rescues her.
- Final Fantasy XIV: Shadowbringers has The Crystal Exarch, G'raha Tia attempt one of these after The Warrior of Darkness absorbs the last of the Lightwarden's aether - by siphoning the aether from the hero and travelling into the rift between worlds, where the aether wouldn't be able to corrupt another person after his death. While he makes a transparent show of betrayal to soften the sting of the sacrifice, the party sees through it immediately, yet allow him to continue for the sole reason that they have no other options. Unfortunately, however, G'raha's sacrifice is interrupted when he's shot by Emet-Selch, and his scheme fails.
- Final Fantasy XV: King Regis knew that Noctis would have to give up his life to save the land, and so did Luna since she was an oracle, and her job was actually to help aid the chosen one in securing enough power in order to complete the task of ridding the world of daemons. Both Regis and Luna did not say a word about this, leading him to believe that he was actually being groomed to be king over Lucis and that he was supposed to marry Luna and rule honorably. In reality, he was being groomed to die.
- A non-death version appears in Freedom Planet. While the heroines can easily break out of Shang Tu's prison, they can't do so while Torque is in quarantine. Lilac's solution is to falsely admit to coercing Torque to clear his name and allow him to escape. Once he's in the clear, the heroines promptly escape. This backfires spectacularly, as Lord Brevon uses that window of opportunity to capture Torque before the heroines can get to him.
- Adam in Metroid: Other M. He even incapacitates Samus so she can't overpower him and object to him doing so! In the postgame, this is given slightly more explanation when a flashback to Adam in the control room is shown and Samus is talking to MB about going to the control room to destroy the Metroids, which Adam soon decided to go in her place.
- Stocke spends the last part of Radiant Historia with one of these, knowing that as the ritually prepared sacrifice he is the only one who can halt the Desertification. If you get the Golden Ending it's subverted, however, as Heiss (who would have been the last sacrifice if he hadn't run away) willingly makes the sacrifice in his place.
- In Rune Factory 4, there's Amber, Dylas, Dolce and Leon who all pulled these when they learn that their friend, dragon god Ventuswill, will die due to lack of Runes in the land. They chose to give their lives and be turned into monsters to fill the land with Runes, keeping her alive. At the end of the 1st Arc, the protagonist tries to pull one, but Ventuswill knocks the idea out of their heads and brings them home.
- Tales of Symphonia had two. The first happened when Colette tried to sacrifice herself to become an angel and save Sylvarant. Lloyd and co. saved her. The second one happened later in the game, in the Tower of Salvation, when there is a trap and Genis helps Lloyd to escape.
- Irving in Wild ARMs 2 does this. Heroic Sacrifices are a family legacy for him, and the entire game is a Thanatos Gambit so that he can seal a living universe in a person-shaped can and then have the heroes step on that can. Bonus What the Hell, Hero? points for dragging his sister along with him. The heroes are not happy when they find this out.
- As revealed in his Flashback Arc in Black Haze, Kiel planned a final ritual to attempt to locate a new power source to sustain the empire's mana usage and, to the shock of his fellow magicians, used himself as the last sacrifice, sending himself into the demon world. He failed to accomplish what he sacrificed himself for, though by that point, he acknowledged that he "couldn't care less anymore" and was resolved to let himself die, overwhelmed by the guilt of failing his younger brother Rood by receiving his Quiet Cry for Help too late and allowing him to die. He then came to find Rood's skeleton in the demon world, and by a twist of fate, the two were forcefully ejected from there very much alive, giving Kiel his second chance.
- Played with in Act 5 Act 2 of Homestuck. Rose Lalonde's plan to take out the Big Bad involves delivering a bomb (The Tumor) to his power source, The Green Sun. However, she plans to use her dreamself to deliver the bomb, leaving her real self unharmed. But then when both Rose and Dave have their real selves killed by Jack Noir, this becomes no longer feasible. Rose and Dave then argue over who should undertake the suicide mission. Ultimately, they both end up delivering The Tumor, but due to finding their Quest Beds in the heart of Derse, are able to ascend to the God Tiers after they die in the explosion. Also, the plan itself backfires; Doc Scratch had been playing Rose all along and the explosion actually creates the Green Sun.
- Cassandra Kam, a graduate student in Tales Of Gnosis College, arranges to feed herself to an exotic creature, possibly a Blob Monster. She implies in a final statement that she has a serious and beneficent reason for doing this, although it isn't specified to the audience.
- A segment of RABBITS tells the story of Arcadia, an idyllic community whose citizens would be taken by madness every eighty-nine days. A madness that would last until one person was killed and then fade until the next time. Arcadia's Keeper, Ivan, spent his life trying to find a way to break the cycle. In old age, he decided to try sacrificing himself, making himself the one death; an act that was forbidden. When the day came, he slit his wrists in the town square as the madness came over him. At first, it looked like he succeeded, but the madness came over everyone yet again. This time, however, it didn't end with one person's death and Ivan lived just long enough to see everyone in Arcadia kill each other.
- In Survival of the Fittest, Ethan Kent manages this by rigging up a power system that would activate the island's only computer, but upon realising he could do it, he also realised that doing so would alert Danya. What he does is insult Feo Smith, his only travelling companion, into leaving him, writes down the instructions on how to turn on the computer, and smashes all the cameras in the location, thus provoking Danya into blowing his collar. Feo and another group of intended escapees manage to find the location of the island, manages to signal it out, and eventually, counter-terrorist group STAR, who have been searching for the island this entire time, manage to hold the terrorist headquarters hostage, get to the island, and rescue most of the students left alive.
- In one episode of Steven Universe, Baby Melon, a sentient watermelon, punches Steven which causes the other more hostile watermelon to attack it instead of the Crystal Gems.