Self-Sacrifice Scheme

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. 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.

Whether they survive or not depends on the kind of story.

Related to Driven to Suicide and Heroic Sacrifice. 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!

Film

 * In Stargate, Jack O'Neil reveals toward the end that  His son accidentally killed himself with his gun and he spends the whole film dealing with it.

Literature

 * The Bittersweet Ending of the second Nightrunner book had one. At the climax, it's revealed that, 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   to kill him. Cue Heroic BSOD on   realizing this.
 * plot to have  kill him in Harry Potter.
 * Of course, Jesus.
 * A Tale of Two Cities
 * A lot of the more sympathetic Sith in the Star Wars Expanded Universe 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.
 * In The Vampire Diaries  makes a bargain with Elijah, with him carefully phrasing the agreement to exclude   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.

Live Action Television

 * In Supernatural, season five
 * "If you go to Z'ha'dum, you will die."
 * "I will do as you ask. But there is a price to pay. I will not be there to help you when you go to Z'hadum."

Manga and Anime

 * Code Geass
 * In Naruto it turns out this was part of
 * 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 . However,.

Videogames

 * Tales of Symphonia had two. The first happened when Colette  The second one happened later in the game, in the Tower of Salvation, when there is a trap and Genis helps Lloyd to escape.
 * Tales of Symphonia Dawn of the New World has
 * 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 The heroes are not happy when they find this out.
 * in Metroid Other M. He even incapacitates Samus so she can't overpower him and object to him doing so! In the postgame,.
 * spends the last part of Radiant Historia with one of these,
 * Final Fantasy XIII-2:

Webcomics
""And in case it wasn't clear, I won't be coming back.""
 * In Homestuck, current plan to take out the Big Bad involves delivering a bomb  to his power source, ..


 * It turns out that just intends to use her dreamself. As Dave says, "those fuckers are all kinds of mad expendable". (Although, if you ask ...)
 * Cassandra Kam, a graduate student 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.
 * Cassandra Kam, a graduate student 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.
 * Cassandra Kam, a graduate student 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.

Web Originals

 * In Survival of the Fittest, 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