In Super Dimension Fortress Macross, Roy Focker is mortally wounded by shrapnel. In supreme badass fashion Focker doesn't even see a medic, he just goes back to his quarters and plays some guitar before falling over dead.
If you look very closely in the final episode of Noir, Altena briefly smiles up at Kirika and Mirielle as she's falling to her death, leading some to think that the finale of the series was actually planned as part of a massive plan.
In Tengen Toppa Gurren Lagann, right before dying, Kamina takes a moment to reassure Simon and reverse his earlier message of "Don't believe in yourself! Believe in me, who believes in you!" to "Believe in yourself. Not in me, who believes in you, not in you, who believes in me. Believe in Simon, who believes in himself!".
Nia decided not only to not force Simon into abusing Spiral Power to keep her alive but also to treasure her last moments with him rather than regretting the time they are not going to be able to spend together. Oh, they treasure them alright.
Also Kittan who stops a Spiral Power-neutralising trap using an attack up till that point exclusively used by Simon, and leaves by laughing quietly to himself about how great Spiral Power is.
Spike from Cowboy Bebop after being fatally wounded goes out with a smile, a simple hand-gesture and a single word to the stunned onlookers: "Bang!"Maybe.
Angemon's "death" in Digimon Adventure, where he willingly sacrifices himself to eliminate Devimon, then smiles at Takeru and says, "I'll come back if you want me to," was pretty powerful for a kids show.
One Piece is a skilled user of this trope, with many characters who die preferring to Go Out with a Smile. The Pirate King Gold Roger kicked off the series by smiling (on the execution platform, no less) and telling the world that whoever wants his treasure can have it if they can find it. The highlight though was the death of Nami & Nojiko's mother, Bellemere. Willingly sacrificing herself for the continued safety of her daughters, a gun pointed at her head, her final words to them before death were "Nojiko! Nami! I love you!"
It becomes a defining trait of people who carry "The Will of D". When Luffy is about to be killed by Buggy the Clown he grins and apologies to his friends that this looks like the end. While it isn't and Luffy is saved by Deus ex Machina he had no way of knowing this. Smoker sees the resemblance between Luffy and Roger's actions. Likewise Ace despite trying desperately to survive for his brother and crew is happy to die as he saved Luffy and dies with a smile on his face. This is one of the reasons that White Beard calls Black Beard out, saying that Black Beard fears death and isn't one of the people Roger waits for.
Mr. 2 Bon Clay, despite having a tearful goodbye to Luffy and the inmates of Impel Down faces his certain death at the hands of Magellan with a grin on his face, telling the Warden that he has no regrets.
In the Trigun manga, Wolfwood sits and shares one last drink with Vash in the rubble outside the orphanage he grew up in and just saved from destruction. The last thing he sees before he dies is confetti thrown by the children as they fly to safety welcoming him home.
In a hopeless situation while trying to give her friends time to escape in one arc of Higurashi no Naku Koro ni, Rena stares down the Big Bad as she holds a gun on her, laughing at her plans until the end.
In the manga, Keiichi does one as well while time is frozen around everyone. He notes that he's going to die anyway, so his friends have to abandon him to his unavoidable fate in order to live. Becomes a bit of a downer when they do abandon him and he STILL dies.
In Umineko no Naku Koro ni, Clair also gets a very serene Obi-Wan Moment. After she's slashed through by Will, she actually curtsies as she dissolves into the stage.
In Sonic X (and the video game Sonic Adventure 2 which the anime was based on) just before being ejected into space and blown up (not really) Sonic looks at his friends, says "hey, it's okay" before telling Tails to finish what he started. He's still smiling as he's blown out of the Space Station. Tails finishes what he started. Awesomely.
"For the first time, Sonic has asked me to do something for him... I won't give up! I won't let him down!"
E-102 Gamma in the Sonic Adventure adaptation beforehand, after getting mortally wounded by his defeated brethen E-101 Beta, he exclaims in horror as the fellow bot explodes, only to express relief when his animal battery emerges safe, before shutting down himself. Granted Gamma is a robot with limited sentience, but since his final emotion was "relief" it still counts.
A rather... special one happens in Mai-Hime. More exactly, when Haruka tosses her red badge at Yukino before she disappears.
Though the one above is the most extreme, the cause of most deaths in Mai-HiME allow many characters to know when its coming and take it peacefully. Two characters, Natsuki and Yukariko, even bring about their own deaths as it's the only way to save the world.
Sousuke's mother from Full Metal Panic!, as revealed from his nightmares and in his backstory. The plane he and she were on crashed in the middle of snowy mountains, and apparently all the rest of the passengers died. They were huddled together, and she protected him from the cold. During Kalinin's rescue mission, although they were able to take Sousuke out of the plane in time, the part of the plane Sousuke's mother was on crumbled, and she ended up falling to her death. She yells out to him, with a sad smile on her face, that he must live, never give up, and to fight. It certainly gives a bit of explanation as to why he's so bent on being Crazy-Prepared and becoming the Crazy Survivalist he is today.
Gates from The Second Raid. As Sousuke uses his Lambda driver to disintegrate Gates' Arm Slave, the guy calmly looks at a strand of his hair and says "Look's like I need a haircut", and is subsequently erased from existence.
He then temporarily comes back from non-existence solely to smack Negi for attempting to use his Superpowered Evil Side, and to give some final advice, essentially having two consecutive Obi Wan Moments. And then he just can't stay away, since it seems he's back permanently thanks to Negi's bunch using the Master Key who brought everyone affected by the Keys back.
Fullmetal Alchemist has General Grumman. His reaction to the Amestris circle activating, ripping out his soul and countless others is to calmly say, "Drat. It's begun. Ashes...to...ashes..." Also, like everyone else who lost his soul, he gets better.
There was also Buccaneer, who smiles and salutes his men just before his death, saying that he'll "be leaving early for a place higher than the peaks of Briggs".
And Bradley. His last words, paraphrased: "Because of humans...towards the end...it was a life worth living."
Seemingly done to finalize the contrast between Father and Van Hohenheim who father based his appearance from and whose actions and the opposite of each other's. While Father screams at his end and desperately tries to fight for survival before he is swallowed by the Truth, Hohenheim simply collapses in front of his wife's grave with a smile on his face.
This is how Lelouch goes at the end of Code Geass, reassuring Suzaku that what they're doing is for the best and giving Nunnally one last smile. Of course, it's kind of strained by the fact that he's been stabbed through the chest and is (apparently rather painfully) bleeding out, but it's still generally what he was doing.
Earlier in season 2, Urabe gives one of these to Zero and Kallen before his Heroic Sacrifice to stop Rolo in a Taking You with Me attempt and allow his comrades to escape. He calmly deflates his protective vest while apologizing in thought to Rakshata.
Jiriaya from Naruto. After a particularly grueling battle against (then) Akatsuki Leader Pain that involved Nagato bringing all six of them together to beat him (considering 1 of them can take on several Jonin Shinobi easily, needing all of them to kill someone speaks greatly for their skill/threat level), Jiriaya is impaled 5 times and dropped into the deep waters below. As he sinks, he grimly smiles and references a Japanese proverbnote "The frog at the bottom of the well knows nothing about the vast ocean" which is about how limited your knowledge of the world is if you don't get out and explore a little. What Jiraiya said as he was dying was "The frog at the bottom of the well drifts off into the vast ocean" accepting his death. Bonus points for the Stealth Pun of the proverb being about a frog, his animal symbol.
In Dragon Ball Z, Goku smiles as he bids his friends farewell saying, "Bye bye, minna" before teleporting a bloated Cell into Kaioh-sama's world. Goku, Kaioh-sama, Bubbles and Gregory die when Cell explodes.
Also, Android 16. Having been blown up by Cell previously, his severed head gives Gohan a final word of encouragement, telling him to fight Cell. He keeps on smiling even as Cell walks up to crush him with his foot.
Jean from Claymore goes out this way while she uses the last of her yoki to help Clare revert back from her half-Awakened state, reassuring Clare that she has finally repaid her debt to Clare after she saved her from the same fate and that she was glad to have met her.
In Saint Seiya, Hades chapter, Virgo Shaka elaborates on the ephemeral nature of life, and how death is only another step, as he is assassinated by the three gold saints. Extra points for him staying in lotus position all the way through it, much in a Buddha-like manner. It is later revealed that accepting death was needed for one to freely wander in the realms of Hades.
In the midst of the entire slaughter that was the Eclipse, Judeau's death in Berserk was particularly heartbreaking, in that he spends his final moments talking to Casca, who he was secretly in love with but never got the chance to tell her his feelings. Instead, he spends it reminding her that her true love, Guts, loved her. He dies less horrifically than the rest of his comrades, dying instead from the injuries he sustained while trying to protect Casca.
In Hunter × Hunter, Kite and Gon's reunion is horrifyingly cut short when Neferpitou senses Kite's strength and decides to use the Hunter to test his own power. Kite loses an arm when he is distracted trying to warn Gon and Killua to run. After Killua knocks Gon out to keep him from attacking Neferpitou, Kite urges them to get away as fast as possible. Kite then calmly conjures a weapon as he prepares for a fight he knows he can't win.
In Sonic Universe issue #3, E-102 Gamma confronts E-123 Omega and Gamma is shown to easily overpower Omega despite Gamma being such a weaker unit. He realizes Omega would be a better choice to return to GUN with and quickly implants a virus in Omega that grants him emotions just before Omega obliterates him. As he's doing this, though, he's telling Omega that he could destroy his body, but not his soul. Omega's response? "Robots don't have souls." He gets one.
In Terminator 2 the T-800 calmly lets Sarah Conner lower him into molten steel and gives a thumbs up before being completely immersed This is in stark contrast to the deaths of the T-1000, who screams and flails in pain the whole time. In the same movie, Dyson sets off a bomb so that with his death everyone had a chance to get out of danger, so he sort of qualifies.
The Trope Namer, of course, is Obi-Wan Kenobi of the Star Wars films, and the brief second of eye contact he makes with Luke right before Darth Vader kills him in A New Hope.
Liam Neeson got a variant of this trope as Qui-Gon Jinn in The Phantom Menace, calmly meditating before his final, brief duel with Darth Maul. This is a case where he didn't necessarily know that he'd be dying, but likely considered the possibility.
Nero of the 2009 Star Trek movie quietly faces his death, even as his ship is ripped apart around him as it sits halfway in a black hole. He was offered the opportunity to escape, but chose to go down with his ship.
Kill Bill had a similar contrast between Bill's muted acceptance and Elle's desperate outrage.
Jack Sparrow, left behind on a sinking ship with an angry kraken, simply smiles, draws his sword and lunges at it. "Hello Beastie."
The Last Starfighter so completely cripples the Ko-Dan mothership that it winds up on an unstoppable collision course for one of Rylos' moons. When Lord Kril is asked "What do we do?", he straightens up, closes his monocle-thing, and calmly replies "We die." And then they do.
In Cyborg 2, Jack Palance is the leader of the underground railroad helping to smuggle cyborgs out from under the control of the Pinwheel Corporation. At the end of the film, the Corrupt Corporate Executive captures him, brings him to his office, and gloats that he's just sent the self-destruct signal to blow up the cyborg heroine (Angelina Jolie!). Instead, it's Palance who starts ticking, and with a smirk he proclaims "looks like you kissed the wrong ass goodbye!" before blowing the Big Bad and his corporate headquarters sky-high.
In Clash of the Titans, Draco is mortally wounded during the fight with Medusa. Aware his time his short, he uses the last of his strength to stall and weaken her. Confident that Perseus could finish what they started, the normally stern Draco gives the hero a peaceful smile, reminding him to tell all that, "men did this." Medusa then turns him to stone and shatters his body.
Jim Stanton in Battle for Terra, after blowing up the terraformer tries to pull up in his fighter in order to Outrun the Fireball, then relents, closes his eyes, and peacefully lets the flames catch up to him.
Clyde Shelton in Law Abiding Citizen, after realizing that Nick Rice has placed his own bomb next to him and locked him in the room, takes out a picture of his dead family and looks at it in quiet acceptance, as he's engulfed by the flames.
Fistful Of Dynamite had a rather interesting variation with John Mallory. After successfully blowing up a train, he gets shot and fatally wounded. We get a brief tear-jerking conversation between him and Juan Miranda... and then he promptly blows himself up.
At the end of Enemy at the Gates, König does this, when he realizes that Zaitzev tricked him and has the drop on him.
Shen actually does this at the end of Kung Fu Panda 2, just as he is about to be crushed by his now-destroyed cannon.
Subverted at the end of Toy Story 3, where all of Andy's (remaining) toys all appear to do this as they are all about to be burned alive in the Incinerator, but then they are all rescued by the Aliens and their crane.
It wasn't used in the final film, but just before his death in 28 Weeks Later, Doyle winks to the kids.
In Rise of the Guardians, as Pitch fires an arrow at Sandman, the latter is getting consumed by the nightmare, he first glares at Pitch and then calmly closes his eyes. He gets better.
The old wizard Ulrich does it twice in Dragonslayer. First, he invites an enemy to stab him as a test of his magic, and then gives the guy a knowing smile before he falls. Then he stands on a mountaintop and lets the dragon catch him in its claws.
The Lord of the Rings, when Gandalf looks at the other members of the Fellowship and tells them to "fly, you fools!" before letting go and falling with the Balrog. And even though he eventually does come back even if he thought it might not be permanent he wasn't sure at the time.
Dumbledore in Harry Potter is a Double Subversion. At first, it appears he's pleading with his killer to spare him. In the next book, it's revealed that his death had been planned by both of them for almost a year, and he was pleading for Snape to honor his word and actually do it.
And then Harry himself repeats the feat in The Deathly Hallows when he finds out that the only way Voldemort can be beaten is if Harry is killed by him. After assuring that there are people who have the necessary information to kill Voldemort, he has a peaceful moment with the ghosts of his loved ones. He then confronts the Dark Lord accepting his fate and not even using his wand to defend himself. Of course, he gets better.
In War and Peace, both of Pierre's mentors, Osip Bazdeev and Platon Karataev, die in this way. Osip, in his bed with Pierre by his side. Platon, shot by the French, having intentionally fallen behind in a POW forced march. Both scenes are described as them dying with a certain dignity.
Tirandys in P.C. Hodgell's Chronicles of the Kencyrath spends his last wounded moments telling his protege and surrogate child Jame that she did right, before ending his own life with the Ivory Knife.
Root in Artemis Fowl does this towards Holly. Not a surprise considering the father/daughter relationship between said person and Holly.
The Dresden Files plays this off brilliantly with Shiro. It's one thing to take a killing blow, it's another thing to volunteer to be tortured to death, then still smile at the protagonist later on your death bed and offer some helpful words of advice.
Mr. Vandemar's final shrug before he lets go and is sucked through the door near the conclusion of Neverwhere is a prime villainous example.
Watchmen has at least two examples. When the artist realizes there's a bomb on his ship and there's nothing he can do, he hugs his girlfriend and awaits the end. Likewise, the newspaper seller instinctively moves to shield the comic-reading kid as a massive explosion engulfs them both. In a book that features quite a bit of Humans Are Bastards, the second example above doubles as something of a Crowning Moment Of Heart Warming.
Harriet Jones: Harriet Jones, former Prime Minister. Dalek:Yes, we know who you are. Harriet Jones: Oh you know nothing of any human. And that will be your downfall.
The 9th Doctor gives Rose a grateful smile to show he's finally made peace with his pain and personal demons before being engulfed in golden energy and regenerating into the 10th.
The First, Third, Fourth and Fifth Doctors also go out without a fuss, after reassuring their companions.
In "Last of the Time Lords", the Master smiles at the Doctor as he calmly dies having refused to regenerate after being shot. Of course, his death is essentially a big "screw you" to the Doctor, and he apparently had plans in place for his resurrection.
And Captain Jack Harkness in "The Doctor Dances". He sits there rather calmly even though a bomb is about to destroy the ship he's on. Of course he's rescued, but there's no way he could have known that would happen.
In Torchwood, when Owen Harper knows he's about to die, and this time he can't come back, he at first reacts with Do Not Go Gentle, and taking the "rage against the dying of the light" bit Up to Eleven. But he ends up this way. And then Tosh who is talking to him over a radio communicator convinces him to go out this way, and that's while she's also dying, and not long after, she also does her own version.
In True Blood, Godric the vampire meets his own end by calmly staring into the sunrise. As if that wasn't enough, he then comes back in later seasons as a spirit advisor (sort of) in true Obi-Wan style.
Tin Man: While he doesn't die immediately after doing it, the Mystic Man smiles serenely and clasps Cain on the back before charging out to make his Heroic Sacrifice, buying the heroes time to escape the Longcoats.
For someone so full of energy and excitement throughout his life, Chris from Skins has an oddly peaceful, serene look on his face when he dies in S2.
In Game of Thrones, Ser Rodrik takes a moment to smile at and Reassure Bran right before he's executed by Theon, and says that he'll be with Bran's father Ned Stark soon.
In Series/Lost, Charlie Pace meets his watery death with truly admirable grace, and is even able to convey valuable information at the end.
Farscape has a couple of these. Talyn!John when dying of radiation poison smiles at Aeryn and says "I've never felt better" before dying. Zhaan also goes out with a smile after giving her shipmates an encouraging speech.
It would almost be easier to count the number of characters in Battlestar Galactica (Reimagined) who don't go out this way. Roslin, Anders, Gaeta, Tom Zerick, D'Anna Biers, the Simon in The Plan, and Admiral Caine all go out in this fashion. Starbuck has two stoic deaths and Cylons who expect to resurrect often go quietly. Even Dee could count, as she rather calmly and deliberately blows her brains out.
Kosh on Babylon 5: while suffering a painful death he's already resigned himself to by the Shadows as penalty for getting the Vorlon fleet to directly engage the Shadows at Sheridan's request, which was against long-standing custom between these races, he contacts Sheridan in a vision as his father and tells him not to blame himself for his death, that he was not wrong to make the request he did of him, and apologizes for having lashed out at him for making it.
Londo Mollari and G'Kar as they both performed their mutual Heroic Sacrifice, killing each other to ensure that Londo's awakened Keeper wouldn't force Londo to betray Sheridan and Delenn as they escaped Minbar, in the flash-forward scene in "War Without End". At that point, the two were no longer enemies but friends, so their long-prophesied strangling of each other was not actually out of violent anger (at least not until the Keeper woke up). Londo Lampshaded the Prophecy by saying "we have unfinished business, you and I", and he said "I'm sure you're as tired of your life as I am".
Sheridan's farewell and going to his predicted death in the series finale.
Centauri Emperor Turhan also faced his death with a graceful dignity. He wanted to make sure he could apologize to the Narn for their past occupation before he died, and make peace with them, which was why he came to Babylon 5—although that overture sadly failed due to the scheming of Londo and Refa.
In Coheed and Cambria's song, "A Favor House Atlantic", Al the Killer goes out by telling the rest of his party to run while he holds the bad guys off with his sniper rifle. As they leave, he tells his love interest "Bye bye, beautiful, don't bother to write", and presumably dies.
Slightly subverted in that Major Tom doesn't die (as revealed a decade later in the song "Ashes to Ashes"). However, he believes he's about to, so it still counts.
Johann Sebastian Bach composed a cantata entitled "Come, Sweet Death". He also supposedly went out calmly surrounded by people he loved. Considering his influence on later composers, it's understandable that he could die confident that his legacy would live on.
Final Fantasy X: Just before his ascent to the Farplane, Auron simply faces the party and proclaims, "This is your world now" before he fades away, content that he can finally rest in peace.
Tidus himself, about to fade away, just smiles at Yuna and dives off the airship.
in Final Fantasy X-2: Lenne (and Yuna as she dreams of the same scenario happen to her and Tidus) smiles reassuringly to Shuyin right before they are both shot to death.
In Xenogears, when Fei destroys Lahan, Alice calmly looks at herself as she is disintegrated. Also, Krelian calmly chooses to "become one with god" at the end which is equivalent to death, even after Fei pleads for him to come back to Earth and atone for his sins.
Mass Effect 1 has a small one around three quarters of the way through the game at the end of Virmire, where you have a choice of saving either Ashley or Kaiden, and the one you leave behind will die in a nuclear explosion. Both of them argue that the other should be saved, and the only thing the condemned one has to say is "I don't regret a thing."
And in Mass Effect 3, Mordin Solus' last words to Shepard and in general fit this. First he tells Shepard that he would have liked to study some seashells that her referenced earliernote he was talking about retiring, and then later quietly sings to himself right before the explosion that kills him.
In Half-Life 2: Episode 2 Eli Vance calmly reassures his daughter and tells her to look away as he is slowly and inevitably dragged towards the alien lifeform that captured them all and impaled. A greatending.
Noble Six: Calmly accepts their duty to ensure the Pillar of Autumn escapes Reach, and watches silently as the starship lifts off. Then, without a second glance, moves to engage the entire Covenant assault force in the full knowledge that s/he will die in the process.
Jorge: Stays behind to ensure the Long Night of Solace is destroyed, exchanging final words with Six and giving him/her hisdog tags. "Tell 'em to make it count."
Carter: Mortally wounded, covers Six and Emile as they head towards the Autumn, then takes out a Scarab in their way by slamming his Pelican into it.
Bonus points for his last words: simply announcing over the radio "Carter out."
Minor nod in World of Warcraft - when a priest has taken the talent Spirit of Redemption, the tooltip description states that the Priest has become "more powerful than you can imagine". Enhanced by the fact that Guardian Spirits in Warcraft have a similar blue-white translucence to Jedi Force-spirits.
Xion in Kingdom Hearts - She dies in Roxas' arms, after telling him that it was her choice to go away now and that she belongs with Sora.
Jaller's death in BIONICLE: Mask of Light as he takes a Rahkshi attack to save Takua, knowing that Takua is The Chosen One and destined to become the Toa of Light.
Jaller: You were always different.
My Little Pony: Friendship Is Magic, "Magical Mystery Cure": Though it turns out that Twilight Sparkle did not actually die—the other characters just thought she did— her apparent vaporization by the Elements of Harmony otherwise fits. Standing at the intersection of five magic beams, she closes her eyes and smiles, just before she disappears in a flash of light, leaving only a scorch mark on the ground.
Possible Truth in Television, in that Socrates is traditionally considered to have died in this way after being poisoned with hemlock. The issue is under contention since no one is exactly certain which "hemlock" it was. Enid Bloch's exhaustive essay ''Hemlock Poisoning and the Death of Socrates: Did Plato Tell the Truth?'' suggests the plant was Conium maculatum, which does cause a creeping paralysis and death in the manner described: "Socrates died gently and peacefully, just as Plato said he did. For Plato not only told the truth, he did so with astounding medical accuracy."
Sam Kinison. The fact that he was blitzed out of his mind on several types of tranquilizers and cocaine might have had something to do with it.
After surviving the wreck of a jet car, Top Gear's Richard Hammond said in a mutual interview with racing legend Sir Stirling Moss, who had survived a similar brain-damaging accident in 1962, that the sensation of being about to die was like getting to the end of a to-do list consisting of: 1) get in car, 2) drive car, 3) crash car, 4) die. "Oh, I've got to the 'die' bit." Moss said that in his case, when his steering sheared at 165+ mph and he found that he'd crossed his arms in front of him, something was wrong, and the only thing left on his mind was "Christ, what does it mean?"
The (admittedly sparse) flight record data recovered from both the Challenger and Columbia wreckage indicated that the crew was calmly diagnosing and attempting to correct the problem of their ship disintegrating around them, even as they plunged to their deaths.
Fabrizio Quattrochi, an Italian security officer taken hostage by Islamic militants in Iraq, shouted "Vi faccio vedere come muore un Italiano!" ("I'll show you how an Italian dies!") just before he was shot in the back of the neck by his captors. He was posthumously awarded Italy's Gold Medal for Civil Valor for that defiant remark.