In A History Of Magic Sadako Sasaki (the girl who died from leukemia as a result of the Hiroshima bombing, and the inspiration of the Thousand Origami Cranes trope) chose this when she used her wish to wish that the atomic bomb never was used again, rather than wish herself cured of leukemia. She thinks it a worthwhile sacrifice, bringing a rare moment of remorse from Kyubey.
In the post-Madoka world, where the masquerade is broken and there's prejudice on both sides, the Puella Magi and the humans are on the verge of war, aggravated by humans sending brainwashed Puella Magi to kill the Magi in positions of power. Billy Kane, the man that technically broke the masquerade (long story why), decided to take the blame for the brainwashed magi assassins in an attempt to stop the war from happening. It somewhat works, though a huge Demon outbreak helped,.
At the very end of the fic, humanity and magi are almost completely wiped out. Kyubey tells Homura that the Incubators plan on taking the last human, cloning it, and using that to create a new stock of humans to make Puella Magi from, and they were willing to wait until Homura died from her fatal injuries to take the baby unless she killed the baby herself. Homura made a wish and sacrificed her chances of ever seeing Madoka again to ensure this baby made it into Madoka's heaven and they both died. The sacrifice was enough to reunite Homura with Madoka anyway, and bridge the heavens between Puella Magi and humans.
Ultimately subverted with Apple Bloom, who is willing to do the same as Bayonet to defeat Queen!Twilight (and later, the Darkness), but survives.
In the Disgaea fanfic The Curse of Blood Laharl blocks a spear strike that kills him to protect Etna. From his brainwashed mother no less.
In Human Curiousity, a number of Nations sacrifice their own chances to escape the HCS facility - leading to their own deaths - in order to secure the freedom of their friends and family. Among them were Scotland and Switzerland (who stayed behind and drew HCS fire so England and Liechtenstein respectively could escape), Denmark (who held back HCS soldiers so Estonia could continue on) and Russia and Belarus (who held off the HCS soldiers that tried to stop England and Liechtenstein from making it outside).
In the Pony POV Series, G1 Mimic pulls a You Shall Not Pass on Discord to let her friends and daughters escape. In the process, she manages to shatter his fang before he kills her in his fury, being the only mortal to ever hurt him permanently.
Subverted comically in Calvin & Hobbes: The Series - Hobbes pulls one of these off while fighting Clock King, and while Calvin dramatically monologues over his body, Hobbes walks in with ice cream, revealing the sacrificed one to be Socrates.
In the Children of Time version of "Evolution of the Daleks," the half-human Dalek Sec offers himself in exchange for the liberation of the Daleks' captured Time Lord, Kit Bennett. It... doesn't work. Then he ends up taking the fire of his own children in defense of his one remaining brother, Jast. He dies after one last plea with his brother for peace.
Twice in Hedgi's ''History Repeats'' series. First in A Captive Light when T.K. takes an energy blast meant for Kari and appears to be dead and second in A Fading Hope when Kari puts herself in harm's way to save T.K. again, she survives, but Gatomon does not.
Officer Johnny takes one for the team in Pokeumans so Brandon and Reggie can make it back to the Long Island base.
In The End of Ends, Count Logan's minions hold down Beljar to allow the heroes to land the final blow. Why? Because they trust Logan so much that they're willing to give their lives for him.
In episode 3 Doc the Metool does this to save Roll.
QN-60 and Dr. Cossack almost do this to save people, but Mega Man saves them.
In episode 10, Ballade does this.
In Episode 77 of Sonic X: Dark Chaos. Tails is crippled and nearly possessed by Dark Tails. He fights against the influence of Dark Tails for as long as he can, and Cosmo is forced to fire the Sonic Driver at them, permanently killing them both.
In The Light Never Goes Out Spike saves the Mane Six from a collapsing mountain in their last adventure together 50 years prior to the story. The sequel explains that Spike helps keep the ceiling of a mountain cave up long enough for a dazed Rarity to be carried out by Fluttershy and Rainbow Dash when a meeting with the half-dragon, half-pony Greyhorn goes south.
In The Land Before Time fanfic The Seven Hunters Skytail sacrifices himself in a last ditch effort to poison Calin. This act not is an act of vengeance for the loss of one of his packmates, but it also buys his surviving followers time to escape.
In The River Variations John pushes Sherlock out of the way in order to take the bullet for him. He is shot twice in the chest and is rushed to the hospital. John sacrifices himself for Sherlock.
In the 25th Kill la Kill AU, we have this with Ragyo, going into the basement to save Nui's life from whatever was down there. This left her mortally injured.