In the finale of the first Fullmetal Alchemist anime, Ed is killed by Envy. Al, who is the new Philosopher's Stone, transmutes himself a few moments later to revive him.
Jonathan Joestar dies at the end of the first part of Jojos Bizarre Adventure, sacrificing himself to take Dio with him. It isn't until part 3 that we find out that his death was in vain, as Dio's head took his body and used it to revive himself.
The first major arc of Death Note ends with Light tricking Rem into killing L, the second with Light's own death at the hands of Ryuk. So by both interpretations - L as the hero and Light as the villain, or vice versa - the hero dies.
Ash is killed by Shin's brother in the final chapter of Banana Fish.
Spike from Cowboy Bebop, though he may actually be a subversion. While there's a boatload of evidence that Spike is walking up the stairway to heaven, Word Of God is that Spike's status is completely open to interpretation.
Byronic HeroLelouch is killed at the end of the series, dying in the arms of his sobbing sister Nunally. Magnificent Bastard that he is, Lulu planned the entire thing to atone for the horrible things he'd done trying to build a better world and to give Nunnally, Kallen, and the rest of humanity a chance for a better future.
He didn't plan it from the very start of the series, but as It Got Worse and his actions caused or helped cause countless deaths, he has a My God, What Have I Done? moment and decides that the only way he can truly up for all the tragedy he caused is with his own life.
Aya was supposed to die in the final episode of Weiss Kreuz Gluhen, but a manga sequel was greenlit and they retconned it so that he survived.
Though inconclusive, the nameless Gun God, the main character of Angel Notes, which is part of the Nasuverse, is possibly dead.
In Chrono Crusade, the titular Chrono's source of his powers is Rosette's own life, meaning every time he uses his powers it shortens her lifespan. When the series starts, she's not expected to live beyond thirty. And at the end of the manga, when the epilogue skips ahead eight years...
The anime version still uses this trope, but in a different way - due to having used up so much of her life during the final battle, Rosette's life span is shortened to the point where she only has months to live. Rosette and Chrono both go into hiding, getting their own log cabin to live the rest of their short lives together in peace before dying. Leaving the series here would have made is a Bitter Sweet Ending - however, it's then revealed that the villain may still be alive after all...
Phantom Of Inferno. In the anime, both Reiji and Ein die at the very last scene.
The Sky Crawlers. The anime film's Hero goes one-on-one with, and dies at the guns of, the Teacher who was previously known as Lynx/Cheetah, the player character of the Wii game, The Sky Crawlers: Innocent Aces.
Witchblade. In the anime, Masane performs a Heroic Sacrifice to destroy the Witchblade and every single I-Weapon that crowded around her.
Goku (who provides the above image) from Dragon Ball has sacrificed his life twice in the series; the first time being when he held his evil brother Raditz still for Piccolo to shoot him with his Special Beam Cannon, knowing fully well that he would have to die too. The second time was near the end of the Cell saga: Cell has inflated to massive size and is threatening to blow up the earth. Thinking quickly, Goku uses instant transmission to send Cell and himself to King Kai's planet and stays during the detonation so that the world will be safe. He is resurrected both times.
Captain Noah from Space Carrier Blue Noah dies after saving the world, him being the hero the show is named after.
Ash Ketchum from Pokémon: The First Movie is killed (or near enough) by a crossfire of psychic attacks. He gets better by a stream of Swiss Army Tears.
In Bakuman。 no one dies in the main story but, Nanamine's Classroom of Truth and the main characters' Reversi kill off their main characters. The former is a Shoot the Shaggy Dog example, in which even he fails to escape the survival tournament for his class. The latter combines is a case of Dying as Yourself, and is seen in-universe as a fitting conclusion to the story.
David Knight in Starman. Not much of a spoiler, since he dies in the first few pages of issue 1 and the rest of the series is about his brother Jack's time as Starman.
Neo and Trinity die at the end of the last Matrix film, though it isn't a downer ending, since he fulfilled his purpose successfully.
Nada (played by Rowdy Roddy Piper) from They Live!. At the end, he dies giving the camera the finger. Arguably a metaphor for the whole movie.
This happens in Gladiator, the hero arguably succeeds.
Lester from American Beauty tells us that he's dead in the beginning of the film.
Ah Jong of John Woo's The Killer dies without fulfilling his promise to have Jenny's eyes fixed. The Big Bad is finished off by Inspector Li Ying, the other primary hero, but Li is arrested by his fellow officers afterward because he did it in cold blood right in front of them.
300: With the sole exception of Dilios, whom Leonidas sent back home to rally Greek support by telling the tale of the 300 Spartans, everyone on the Spartan side ends up dead on the third day of the Battle of Thermopylae. Most definitely not a case of The Bad Guy Wins, since their sacrifice delayed the Persian army long enough for Athens to be safely evacuated before it was destroyed, and for the Greeks to begin their own campaign to drive the Persians out of Greece forever. The movie skips past a year of this campaign during the epilogue, but there's another graphic novel in the works that will be set in that missing year; a movie sequel based on this new novel has not been ruled out.
The captain, the sub, and a whole load of the crew in Das Boot.
In fact the captain survives. We see him hurt, not dead, and according to Word Of God he lived (and so did the real person he is based on).
In both the book and the movie of Cold Mountain, Inman dies after making it home to Ada and fathering a child.
Possibly Nina in Black Swan, who stabs herself with a mirror shard, thinking she has killed Lily, and completes the performance while bleeding profusely.
Bruce Lee's character in Fists of Fury/The Chinese Connection.
Rooster Cogburn dies of old age in the remake of True Grit.
In L: change the WorLd, to capture Kira L writes his own name in the Death Note, giving himself 23 days to live. The film is about how he chooses to spend them.
In The Book of Eli, Eli has succumbed to his gunshot wound by Carnegie and died upon reading all the contents from his memory of the King James Bible to Alcatraz press company.
Harry Dresden as of the end of Changes. He then spends the next book, Ghost Story, solving his own murder. As a ghost.
The novelization of the original Mobile Suit Gundam, aside from many other differences from the plot of the anime, has Amuro Ray die several chapters before the end of the book. Despite Yoshiyuki Tomino's reputation as "Kill 'Em All Tomino", he said that he only did it because he thought it would be a single complete story and that if he had planned on making sequels from the start, Amuro would have lived.
1984. Winston and Julia are caught, tortured and Mind Raped by O'Brien, a guy who was supposed to be their link to "the Brotherhood," but is actually a member of the Inner Party. They are broken so thoroughly that all love that they had for each other is dead (particularly since the two were forced to betray each other through means of Room 101, which faces them with their worst fear — for Winston, it was rats, though since the story is in Winston's perspective, we never do find out what Julia's worst fear was), and then executed by being shot in the back of the head. Not just a Downer Ending, but a Shoot the Shaggy Dog, given the last four words: He loved Big Brother.
Outbound Flight. Lorana Jinzler died in a Heroic Sacrifice. She was the only unambiguously good character in that half of the novel. The other major characters, who might be called heroes, survived — but Thrawn and Car'das and Doriana weren't entirely good people.
In Firewing, Shade the Bat kills himself in the Bat Underworld to give his son, Griffin, and his friend, Luna, life force to feed on and become living, breathing bats again. In the end, he still survives, but in the form of the foliage of the forest floor. When he's dead, he flies around the world and can be anything he wants to be.
In The Last Chancers last novel, Kage, possessed by a Slaaneshi daemon, decides to commit his first ever act of altruism and jumps off a cliff to his death, taking the corrupt governor with him.
David dies at the end of the third Dragons book, Firestar, by Chris D'Lacey. Initially, this looked like it would be the end of the series, making it an unusually harsh ending for a book aimed at the 8-12 bracket. The series didcreep on, and David came Back From TheHigher Plane Of Existence, with the implication being that he became one with God(ith) and saw all the knowledge in the universe through his daughter's eyes, but if unexpected, the ending of Firestar can be a real punch.
Antony and Galen in the second and third books, respectively, of Marie Brennan's Onyx Court series. Technically, all the mortal heroes of the series could count, as given the large time skip between books, the hero of the previous one is always dead by the time the next one comes around, but Antony and Galen get special mention for dying during their respective stories.
Elend AND Vin at the end of the Mistborn trilogy by Brandon Sanderson.
Live Action Television
Jack Shephard dies in the final scene of Lost, and we even get to see him moving on to the afterlife.
Xena, after "dying" several times throughout the series, dies for the final time in the series finale.
Buffy died at the end of the Season 5 episode "The Gift." The next season, they brought her back. She also died at the end of the first season, but only for a few minutes and was revived with CPR.
When Flower died on Meerkat Manor, the show was completely shattered. Next Generation with Rocket Dog just wasn't/isn't the same... She was their star and the pillar that held the show up.
Victor "I don't believe it!" Meldrew was stuck down by a car in the finale of One Foot in the Grave. Noticeably, the climax of the episode wasn't his death, but rather his wife's reaction to it.
Nick Cutter is shot midway through the third season of Primeval
Robin Hood dies at the end of the third season, joining his wife Marian who had died at the end of the previous season. Despite attempts to set up for a forth season, the show was inevitably cancelled.
Farscape's John Crichton (one of the twinned two, anyway) died a hero's death at the end of Season 3's two-parter Infinite Possibilities. Luckily, there was a backup "copy" on Moya.
In the Doctor Who episode "Turn Left", the Tenth Doctor is killed in the parallel universe created by Donna's mind after he floods an abandoned Torchwood base with him inside it, creating all sorts of chaos and havoc.
In "Father's Day", the Ninth Doctor is consumed by Clock Roaches after Rose created a paradox saving her father. After her father fixes this error, he and everyone else on Earth returns.
In "The Impossible Astronaut" Eleven is killed to death, mourned, and cremated, only to show up a few minutes later, completely clueless as to why everyone is so upset. Their past, his future, cue plot arc.
In The Sarah Jane Adventures story Whatever Happened to Sarah Jane, the Trickster makes a deal with Sarah Jane's friend and switches places with 13-year-old Sarah Jane, making her fall to her death. She later relinquished her deal, causing time to return to normal.
Earth: Final Conflict is a rare case where the hero died at the end of the first season, but the show still continued without him.
Captain Jack of Torchwood. Repeatedly. Firstly by Dalek extermination on Doctor Who, and over 1300 times (not all chronicled) since.
Owen Harper is shot by the leader of The Pharm, Aaron Copley, is made undead, and presumably dies again after being trapped in a nuclear plant control room flooded by radiation.
Toshiko Sato is shot by Jack's brother Gray.
Ianto Jones dies from a virus inflicted by the 456.
In Torchwood: Miracle Day, Esther Drummond is shot by the Three Families while temporarily immortal to stop Torchwood from making humanity mortal again. They refuse, and Esther succumbs to her wounds.
Rex Matheson is shot by an agent of the Families, but gains Jack's healing ability.
The team fall under the category of this trope because they are all heroes (at least by series 2), and get roughly the same amount of screen time.
Also Macbeth, King Lear, Othello, Julius Caesar... essentially, the title character of every Shakespearean tragedy (although how heroic they are is a matter of some debate in each case).
What's interesting about Julius Caesar is that the title character dies halfway through the play, spending the rest of it as a corpse, a ghost and some military inspiration. Whether or not this in fact makes Brutus the hero is up for debate.
The same applies to the title character of nearly every tragic opera as well.
Repo! The Genetic Opera kills off its title character, the Repo Man Nathan Wallace, near the end of the play.
Jean Valjean in Les Misérables. Also, pretty much everyone else in the cast... except the lovers Marius and Cosette, and the two most horrible people in the entire play - The Thenadiers - who become rich in addition to living. Pretty dramatic example of the trope.
Video Games
Kratos from God Of War dies many times throughout the franchise, only to come back out of Hell every time. In the ending of the third game, he stabs himself with the Blade of Olympus to end his life for good. It is actually up to speculation whether he is truly dead or alive, since his body goes missing after the credits roll.
Betrayal At Krondor ends with the Heroic Sacrifice of Gorath, who, if not necessarily the main protagonist, is still undeniably the hero of the story.
The Command & Conquer series actually does this a fair amount. For GDI, one of your operation commanders, Carter, eventually is seen with beginning Tiberium poisoning, but is killed by a Nod obelisk in his gunboat. Mc Neil, the GDI commander in Tiberian Sun ends up 'killing' Kane, but in the following expansion, Firestorm, he is killed right before the first mission when an ion storm downs his command ship (though if the Tiberium Wars novelization is canon, he wasn't on board when it happened). GDI also loses everyone on board the Philadelphia (space borne command center) in the opening stages of Tiberium Wars. If Nod is your faction, they lose both the first and second wars, with Kane being reportedly 'killed' each time. Slavik of Tiberian Sun dies right before C&C3 Kane's Wrath starts. And in C&C4, the player character themselves dies in the ending, no matter which side you choose to play as. Subverted with Kane in this case though, as he completes his plan for Ascension and leaves Earth through a Scrin portal.
Chrono Trigger has Crono die. You can ressurect him by playing around with Time Travel, but it's completely optional and you don't need to do so to beat the game.
To be specific, he was a dream created by the Fayth. The dreams of the Fayth, which include Zanarkand and the rest of its inhabitants, were kept alive by both their deep sleep and the Big Bad. When he dies, Tidus vanishes.
Harry Mason, the hero of the first Silent Hill, dies halfway through 3. He also dies in the non-canon Bad Ending of the first game. And in The Room, Henry dies in the worst ending.
It's been implied that the bad ending of Silent Hill 2 (James driving his car into the lake) actually is the canon ending.
Mass Effect 2, twice, same hero. Once is at the beginning and unavoidable, though you do get better thanks to Cerberus. The other is the bad ending, which you get for being lazy on an epic scale.
The end of Bioshock 2 always involves Subject Delta dying, though it's his influence on Eleanor that determines how things end up and several of the endings involve her taking his essence so that he live on through her as a Spirit Advisor.
Michael Beckett, the protagonist of FEAR 2 is killed near the end of F 3 AR by Paxton Fettel.
In Fire Emblem 4, the main character, Sigurd, is betrayed and killed at the end of the first half of the game, along with most of his army, in one of the most depressing scenes in gaming. The second half of the game centres on his son, Celice.
Call of Duty: Modern Warfare 2 is a doozy. Of the four heroes you control, two die, not to mention another character you control for all of five minutes. That's three out of five player characters dead by game's end, not to mention multiple NPC squadmates, but that's more Anyone Can Die.
Medal of Honor 2010: Rabbit is captured by the terrorists and mortally wounded, and his rescuers encourage him to hang on while the rescue chopper arrives, with the first person view periodically blacking out, but he ultimately expires.
Nathan Hale in the ending of Resistance 2. Though he had just succumbed to The Virus he'd been struggling with the whole time, so he technically wasn't a hero when he died.
Nariko from Heavenly Sword succumbs to the curse of the title sword and dies at the end. Though not before taking King Bohan with her in a final showdown.
Martin Septim from Oblivion dies to summon the God Akatosh in order to kill Dagon. He may not be the player, but Martin is arguably The Hero.
The silent protagonist Anon from TRON: Evolution died protecting Quorra from a huge falling aircraft.
In L.A. Noire, Cole Phelps is killed by a rush of water during the final case in a sacrifice to save an old member of his unit. The last cutscene before the credits takes place at his funeral.
In The 3rd Birthday, depending on how you look at it, Aya Brea was revealed to be Eve all along throughout the whole game that you play as her. In the ending, Aya and Eve switched bodies, with Aya in Eve's body doing a heroic Sacrifice to be gun down to prevent dooms day, leaving Eve alive using Aya's body. Aya was the protagonist from the first 2 Parasite Eve games while Eve was the heroine of the 3rd game, thus the outcome kinda mind screws you regarding this trope
Ending D of Nier has the player character sacrificing his entire existence in order to bring Kainé back to life after the Shade Tyrann takes over her body.
In case you don't know exactly what that means, the D Ending of Nier is the last ending you can possibly get in Nier. It is the last ending because getting it erases your entire save file piece by piece as Nier himself is erased from existence. It's pretty hardcore.
In Indigo Prophecy, Lucas died from the fall caused by the Oracle when he is saving his ex-girlfriend Tiffany. However, he got better.
If you play the good Karma final mission against the beast in Infamous 2, Cole's actions will led to every conduit's as well as his own demise. The people of new Marais will honour and remember Cole as a hero for his deeds.
The lone wander of Fallout 3 dies if you take the 'good' path, this was fixed by the add on broken steel.
If you choose to fight the emperor, Starkiller in Star wars the Force Unleashed will die fighting the emperor to buy time for the resistance to escape. Though he "indirectly" got better in the sequel.
In Grand Theft Auto: Vice City, Victor Vance, the protagonist of Grand Theft Auto: Vice City Stories is killed during an ambushed drug deal in the opening cutscene.
Asura's Wrath titular character dies THRICE from his first betrayal to his facing Yaksha the first time and his fighting against and a third time if you consider his turning into a statue from the nuclear explosion from the gigantic Gohma's death he dies one last and final time while in his Berserker Form which begins to kill him as he uses it.. He gets better from his Heroic Willpower.
An interesting case in Xenoblade Chronicles. The protagonist Shulk was technically dead since long before the story began, only being kept alive by the god dwelling within him, who was also the one who killed him in the first place. When said god leaves his body, he becomes truly dead, but has his life force restored by a more benevolent god shortly after.
Shirou dies at the end of the Heaven's Feel route of Fate/stay night (Unexplained Recovery in one ending). Saber dies at the end of the route she's the heroine in, after being sent back to her own time and giving up on the Grail.
Captain Kaff Tagon and Seargent Schlock in Schlock Mercenary (arguably the two primary characters) are killed and stripped of all memories/former self, respectively. Averted via time travel.
...eventually. The strip ran for quite a while looking like leadership of the Toughs was going be by Kevyn, with a degree of awkward mentoring from Tagon's father. Technically, the time travel was mostly required to avert the death of everyone in the galaxy.
John Egbert's physical self in Homestuck ends up getting killed by Jack Noir. He gets better when his Dream Self replaces him, and in fact this event allows him to reach the god-tiers... and then his god-tier self is also easily killed by Jack Noir. Fortunately, god-tiered characters have conditionalResurrective Immortality.
All of the kids and all of the trolls die at least once. As of the current plot a lot of people have died twice, and most of these second deaths have proved to be permanent.
Act 6 invokes this trope with the apparent death of a newly introduced main character. After about a month, it turned out that she actually did not die, but the fact that the event came out of nowhere certainly shocked readers.
And that's just the first example. Optimuses die a lot...
Avatar: The Last Airbender: Aang is killed by a lightning blast to the back from Azula. While Aang was ressurected a few minutes later, his death had disastrous consequences. Namely, the Fire Nation took over the Earth Kingdom (their only obstacle to world domination besides Aang himself) and Aang was rendered unable to use the Avatar State until the final episode.
In Futurama: Bender's Big Score, a future version of Fry named Lars dies because he is doomed Temporal Paradox. Time clones being doomed (DOOOOOOOOOOOOOOOMMMEEEEEED) is in fact central to the plot.