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 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!
- 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.
- 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.
- 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 be returned 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.
- 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.
- 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.
- 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 Pandora Hearts, 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 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 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.
- 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...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 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.
- 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.
- Dumbledore's plot to have Snape kill him in Harry Potter. It was the only way Snape could gain Voldemort's full trust.
- Of course, Jesus.
- A Tale of Two Cities: Sydney Carton
- 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.
- 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.
- 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.
- 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.
- Leto Atreides II in the Dune series.
- 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 Supernatural, season five ends with Sam following through on one of these to lock up Lucifer.
- In the revived Dallas series, the death of J.R. Ewing (brought on, of course, by the Actor Existence Failure 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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 said 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.
- 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.
- 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.
- 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.
- 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 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.