Perhaps include here also ANY war movie where the flawed character with the shady past calls in an air strike (or artillery barrage, etc) on his own position to save his partner or teammates and redeem himself and his reputation although it means certain death.
Also, Dillon, who stays at the bottom of the lead mold to keep the alien from escaping, telling it You Shall Not Pass. Leads into a Dying Moment of Awesome when the alien charges him and he grabs hold of it, taunting it angrily as he is ripped to shreds.
In the 1998 adaptation of The Thin Red LineWitt draws the attention of an approaching Japanese column to buy time for the rest of his unit to escape, only to get surrounded and gunned down.
In the 1964 adaptation of the same book, Welshtakes the bullet for one of his men.
It should be noted that neither of those examples come from the book.
Constantine: Unable to stop Gabriel from unleashing Hell on Earth, John Constantine brings the plan to Satan's attention by committing suicide. After setting everything right, Satan offers John a life extension in exchange for his assistance. Already dying from lung cancer, Constantine declines, instead asking that the soul of Isabel Dodson be allowed to return to Heaven instead. In doing so, he earns his way into God's good graces, who prevents Satan from taking John to Hell. As his body rises to the heavens - while giving the Devil the fingerno less - the now angered Satan rips the cancer from Constantine's body, restoring him to full health. He does so in order to give John another chance to prove that his soul belongs in Hell, not Heaven.
In Coraline, Other Wybie and Other Father are created for the sole purpose of adoring Coraline. And they do, enough to defy the Other Mother. Other Wybie is killed for helping Coraline escape back to her own world the first time, and Other Father is drowned and then destroyed entirely when the mechanical giant mantis that was forcing him to fight Coraline falls through the garden bridge, but not before he succeeds in giving her something she needs to win against the Other Mother.
Selma in Dancer In The Dark. In the latter half of the film, Selma is convicted of murder and sentenced to death. She meets with a new lawyer who says her previous lawyer was incompetent and new evidence has been brought forth that could save her from death. The only way to pay for this new attorney is to use the money that Selma had been saving for her son to get a surgery that would cure his hereditary degenerative blindness. Believing that it is important for her son to be able to see his own grandchildren some day, Selma chooses to die. Just before Selma is hanged, her close friend tells her that the surgery was a success.
Occurs in the Death Note live-action movies (but not the original manga or anime). Like in the anime/manga, Light gets Rem to write L's name in the Death Note. When L is apparently dying due to that, Light admits that he's Kira to him... but then it's revealed that L outwitted Light by writing his own name in the Death Note before Rem did, setting himself to die in 23 days and overriding Rem's attempt to kill him. L thus proves Light is Kira, but still dies less than a month later due to writing his own name in the Death Note.
The wizard Ulrich, who sacrificed himself twice in Dragonslayer (1981). His first death placed part of his life force into a gem and his 2nd death when the gem was crushed killed the dragon, as he exploded while being carried by it.
In End Of Days, Satan has until midnight on New Year's Eve to impregnate the chosen bearer of his child, and having been thwarted once by her bodyguard Jericho Cane and running out of time, he possesses Jericho himself in a last ditch effort to rape her. Jericho is able to resist Satan's control just long enough to allow her to escape and impale himself on protruding sword of a nearby statue. Midnight passes, Satan is driven out of his body and back to hell, and Jericho dies. Since Jericho regained control with only five seconds left on the time limit, this may also double as a Stupid Sacrifice.
Enemy at the Gates. In the middle of a sniper stalemate in between main protagonist Vasily and the German Cold Sniper, Vasily's friend-slash-sentimental-rival, quite jealous that the Love Interest (now presumed dead) has chosen Vasily over him and disillusioned with the communist cause, exposes himself to the enemy's field of fire as a final act of friendship and gets a bullet in the head as a result; this allows Vasily to pinpoint the bad guy's position and kill him.
Danilov: I want to help you, Vassili. Let me do one last thing, something useful for a change. (Takes off his helmet) Let me show you where the Major is.
A View to a Kill: After the Zorin double-crosses his men, including May-Day (his Dragonand lover) she tries to help Bond move the detonator he intended to use to set off the explosives that would destroy Silicon Valley out the mine; when it gets stuck, May-Day leaps onto it and manually moves it out of the mine, dying when it explodes. Her last words to Bond: "Get Zorin for me!"
In Event Horizon, Miller blows the ship in half just before the hyperspace portal opens, allowing the survivors on the other side of the ship to escape while leaving himself to an unknown, horrible fate in the Lovecraftian hyperspace dimension.
The original Godzilla has Doctor Serizawa using his Oxygen Destroyer to kill the titular monster, but, fearing that it will become weaponized by governments, destroys all his notes and allows himself to be killed by it as well, destroying the knowledge of its creation forever.
In Mothra Vs Godzilla, Mothra goes into battle against Godzilla knowing full well that she will die.
Topping that, in Godzilla Final Wars, Mothra, mortally wounded, kamikazies into Gigan's head, blowing both of them up
Then there's Godzilla Tokyo SOS in which Kiryu (A cyborg version of The ORIGINAL 1954 Godzilla that somehow manages to gain self-awareness) carries Godzilla over the ocean and sinks both of them to the bottom of a trench.
And when Hawkeye offers to be burned alive in Cora's place, and thenhis romantic rival Major Heyward deliberately mistranslates the offer so he gets killed instead....
Edmund in The Lion, the Witch, and the Wardrobe; nearly everyone except the main characters that attacked Miraz's castle in Prince Caspian. Also when Aslan sacrifices himself to save Edmund; although he knew the Deeper Magic would cause Death itself to start working backwards, there was nothing in the least imaginary about his execution.
Mission to Mars: The rescue mission's leader does a slightly accidental Heroic Sacrifice when he purposely overshoots the satellite the four-man band need to land on Mars, going out of range of both the team and their grappling hook and a more deliberate one when he removes his helmet so his wife won't risk her life trying to save him, and the two other guys' to save theirs.
The Pirates of the Caribbean trilogy is rife with Heroic Sacrifices and attempts at the same, including the fate of James Norrington.
Also subverted earlier in the same film. Mal is going to take the shuttle to meet with Inara and spring The Operative's trap. He explicitly tells Zoe that if they do not hear back from him in an hour, "You come and you rescue me".
Mal: What, it's cold out there. I don't wanna get left.
During the final assault on Ecoban at the climax of Sky Blue, Goliath jams a bomb onto Locke's tank and detonates it, destroying the tank and killing himself in the process. Unfortunately, Locke survives.
Space Cowboys: Tommy Lee Jones' character, already afflicted with cancer, volunteers to divert the Russian missile satellite, forcing him to leave the ship and lose his chance to return to Earth. He spends his last day alive on the surface of the moon, whistling Sinatra.
Spider-Man 2: After getting the senses smacked back into him, Dr. Octavius pulls his very unstable sun-generator into the water with him, saving New York City.
Spider-Man 3: Venom grabs Harry's glider and tries to kill Spider-Man, but Harry intercepts and is stabbed instead, in the same manner his father was.
Captain Robau boards a shuttle to go 'negotiate' with Nero which is done mainly to buy his crew time to evacuate the crippled Kelvin.
George Kirk staying onboard the Kelvin to protect the escape shuttles from enemy fire. The conversation with his wife where he tells her he loves her steers this straight into Tear Jerker territory, no pun intended.
George Kirkrams his dying starship down the throat of a many-spiked alien death fortress to save his wife and newborn son.
"Your father was captain of a starship for 12 minutes. He saved eight hundred lives, including your mother's, and yours. I dare you to do better." Crowning Line of Awesome!
Captain Pike pulls a Robau, surrendering to Nero to buy time for his crew to stop him from destroying Vulcan (which doesn't work out, but his actions still keep Nero from destroying the Enterprise). Oh, and the sacrifice is subverted when Jim Kirk later boards the Narada to pull the tortured Pike out before Spock tries to do his own heroic sacrifice.
Subverted. Spock attempts to do the same thing with the Jellyfish, but the Enterprise shows up for a Gunship Rescue and he is transported out in time.
In Terminator 2, Miles Dyson — one of the scientists primarily responsible for the development of Skynet and its technologies — is mortally wounded by a SWAT team infiltrating Cyberdyne Systems. He stays behind while the heroes escape in order to detonate their explosives and destroy all the research on Skynet.
In Terminator 3, T-800 pulls out his remaining nuclear fuel cell, stuffs it into Terminatrix's mouth, says "You're Terminated", and is promptly consumed by the fuel cell's explosion.
Terminator: Salvation absolutely takes the cake. When John Connor's heart is pierced and failing, Marcus offers his own heart as a transplant.
And of course, in the first movie, there was Kyle Reese who made one last attempt to protect Sarah by holding back the Terminator and then placing an explosive in its chassis, killing himself but also blowing off the bastard's legs, giving Sarah the opportunity to finally kill it.
In Transformers: Revenge Of the Fallen, Jetfire rips his own spark out so that Optimus can use his parts to fight The Fallen.
Optimus Prime himself kinda has one of these, after fighting Megatron, Starscream and Grindor and assuming them beaten, he drops his guard to see if Sam is still alright and Megatron stabs (and shoots) him from behind, which kills him. With his last words, he tells Sam to run. He got better at the end of the film though by coming Back from the Dead (in true Optimus Prime tradition).
Jazz also gets one of these in the first film. He attempts to fight Megatron alone, whilst the others are retreating, in order to buy them time. Given Megatron's immense size and power in comparison with Jazz, he was rather easily beaten, but even when Megatron prepared to finish him off, Jazz still goaded him.
In Volcano, a train supervisor is going in with the rest of the men to save the passengers and the train operator, who have been trapped in a rail car that is being engulfed by lava. He chases the others out before they succumb to fumes or heat and goes to get last person left, the operator, dragging him out "fireman's carry" on his shoulders, and we can see the train has already gotten so hot from the approaching lava that his shoes are melting as he starts reciting the Lord's Prayer ("Our father, who art in heaven..."). As he reaches the front of the train, lava has already gotten around in front of the train. The other railroad employees, who have escaped into the clear and can't reach him, implore him to jump and save himself. With only seconds to spare, holding the man on his shoulders, he jumps, landing in the pool of lava, then, with the last of his strength, throws the other man clear.
Also, the SWAT team/demolitions guy who gets pinned under some rubble while he and his partner place explosives critical to the survival of L.A. Knowing that they'd never get the guy out in time, they give the "all clear", leading to the explosives going off, saving L.A. Touching.
Subverted in The Hunt for Red October. As the Soviet sub is being evacuated following the false reactor accident, Captain Ramius tells the ship's doctor to go with the crew in the life rafts while Ramius and the officers submerge and "scuttle the ship" (to which the doctor replies that Ramius will "receive the Order of Lenin"). Unbeknownst to the doctor and crew, Ramius intends to meet up with an American sub to defect and hand over the Red October. The crew is rescued by a U.S. destroyer, upon whose deck they see the surface elements of an undersea battle, culminating in an explosion which they believe destroys the Red October.
Ken of In Bruges sacrifices himself in the name of Ray's redemption by tossing himself off the top of the tower and splattering on the cobblestone pavement below. The original intention was to deliver a gun to Ray and warn him so that he could defend himself, but the gun was apparently crushed under his massive body, so he was only able to give the warning. Ken even prepares for the event by putting on a black suit, leaving his will tucked away on the dresser, and displaying an almost stoic attitude towards his boss (but getting shot in the leg still hurts like a bitch).
In The Dark Knight, Batman confesses to the killing of all of Harvey "Two Face" Dent's victims and takes the fall in order to protect Dent's image as the 'good guy' that the city needs. He becomes a fugitive from this point on, even though he did not kill Dent's victims.
Nearly EVERYBODY in Damnatus. Injured Oktavian stays behind and blows himself up when discovered. Adeodatus grenades himself to both try and destroy the daemon and prevent his own possession (he only succeeds on the second count). Von Remus pulls a You Shall Not Pass to let Nira escape. Nira herself then dies trying to banish G'guor. Farseer Phaer makes one too...from beyond the grave!
"In this universe, one is either sacrificed or sacrifices themself." Arc Words indeed.
In the final cut of the I Am Legend movie, Will Smith's character blows himself up with a bunch of zombies in the end so that the woman and her child can escape with the vaccine that would cure the zombies.
In Resident Evil Extinction, Betty sacrifices herself by trapping herself in a bus with a horde of undead ravens and blowing up the bus. Later in the film, Carlos does the same thing. He rigs his truck with explosives and suicide bombs himself into a horde of the undead.
In Sunshine, physicist Capa - and arguably Cassie - sacrifice themselves to ensure the bomb successfully detonates.
Nearly the entire cast dies in separate heroic sacrifices: Kaneda gets obliterated by the sun repairing the solar shield, Mace dies of hypothermia repairing the mainframe, and Searle stays behind on the Icarus I in order to operate the airlock (even though he then commits suicide by subjecting himself to 100% exposure to the sun, he was only hastening his inevitable death). Even Trey arguably sacrifices himself by suicide, so the rest of the crew has enough air to survive.
In 9, 9 attempts to do this in order for 7 to take the talisman from the Fabrication Machine and therefore destroy it, but 1 pushes him out of the way at the last second and is killed in his place.
District 9: through his Heel Face Turn, Wikus ultimately decides to help Christopher get to the dropship, even if it means he himself will either die or live and transform completely.
The Running Man. Laughlin shoves Richards out of the way and is mortally wounded by Buzzsaw's attack.
Richards: He saved my life. It should be me down there.
At the end of the classic giant-ant movie Them!, trooper Ben Peterson sacrifices himself to save two young boys.
Jurassic Park The Lost World: Eddie saves Nick, Sarah and Malcolm from falling off a cliff by securing a cable to the sliding trailer and throwing a rope to the others. As he tries to pull the trailer back up with his SUV, the two T Rex that pushed the trailer in the first place come back and start to attack him. Despite the car being torn apart around him, he still keeps his foot on the accelerator trying to save the others. Ultimately though, he is plucked from the car and killed.
Armageddon is a disaster film where anything that can possibly go wrong does. At the end of the movie, in order to detonate a nuke that destroys a meteor destined for Earth, one person has to stay back and manually detonate it because the remote detonator was broken. Naturally they draw sticks and Ben Affleck's character drew the shortest stick. However, as he leaves the ship to fulfill his duty, Bruce Willis who had planned all along to be the one to do it immediately cuts off Affleck's oxygen supply and locks him inside the ship, taking his place and sacrificing himself to save all of humanity and the Earth.
Deep Impact, a similar movie to Armageddon has the entire shuttle crew with the nukes sacrifice themselves on the same mission.
In Air Force One, an F-16 pilot interposes his plane between a missile fired at the titular plane by a MiG. Apparently, he did not think to eject before impact.
Needed to stay to the end to ensure success.
In the Babylon 5 made-for-TV movie A Call To Arms, Captain Anderson rams the IAS Victory into the control node of the Shadow Planetkiller, saving Earth from destruction. As usual, this is preceded by a clenched fist and the phrase "Ramming speed!"
In the Hungarian animated film Vuk aka Vuk The Little Fox or Vic's (as he's known in the U.S. dub) uncle Karrack gives his life to save him and his mate Foxy from a hunter's bullet.
Child's Play 3: Whitehurst jumps on a live grenade to save his friends.
The Exorcist: Father Karras, in a flight of rage in the very end of the film, tackles the possessed Regan, demanding that the creature take his body instead. It does so, freeing Regan, and in a struggle between himself and it, the Father throws himself out of the bedroom window, killing himself in the fall down the stairs, thus preventing it from getting to Regan (and hopefully anyone else) again.
X2 and X-Men: The Last Stand: Jean Grey accomplishes this, twice: The first time, when the Blackbird is frozen at Alkali Lake with the dam about to burst in mere minutes, Jean steps off the jet and uses her now heightened telekinesis to break the ice and allow the jet to lift off, at the same time psychically restraining her teammates to keep them from stopping her. She frees the jet seconds before she is seemingly crushed beneath tons of rushing water.
Having survived this in X3 but also becoming the Dark Phoenix, Jean twice regains her sanity long enough to beg Logan/Wolverine to kill her so she won't kill anyone else. He finally relents at the movie's climax and impales her on his claws.
The Last Starfighter with Centauri as he defends Alex from the hitman. Also it's a case of an inverted trope as at the end of the movie Centauri comes back.
In Tangled, Flynn is mortally wounded by Mother Gothel. Rapunzel offers a heroic sacrifice (of the non-fatal variety) by promising to stay with Mother Gothel forever if Gothel will only let Rapunzel heal Flynn with her magic hair. Unwilling to allow Rapunzel to be imprisoned forever because of him (since he knows that she will never break her word), and because telling her not to doesn't work, Flynn performs a heroic sacrifice of his own by cutting Rapunzel's hair with a shard of glass before the healing incantation can be sung. Yes, he got better, but he didn't know that he would at the time.
In the climatic battle at the end of the final movie in The Matrix series, Neo jacks himself into the virtual world once more, but not before making a deal with the Machines: Destroy the rogue agent Smith and the Machines will establish peace with the humans. Powered by the code of the Matrix's "mother", The Oracle, Smith is too strong for Neo, but Neo realizes he must lose himself to win and lets Smith assimilate him. Smith gets promptly deleted by the Machines when they're able to use Neo's avatar to excise Smith's code from the Matrix once and for all.
Subverted in the first film with Morpheous. He attacked Agent Smith with the full knowledge that he wasn't going to win/escape. When the surviving crew members contemplate whether or not to pull the connection on him to prevent the Agents from obtaining the access codes for Zion, the last human city, Neo instead takes an alternative option; to simply go back in and rescue their leader. Several gun fights later, he succeeds with a Gun Ship Rescue.
In TRON, Flynn decides to jump into the Master Control's matrix to act as a distraction and save Tron after getting a Last Kiss from Yori. Luckily, that ends up not only working, but also shoves him back into the analog world.
In Predator, Billy makes a last stand on a log bridge to give the rest of the team time to escape.
In Predator 2, Jerry Lambert blocks the Predator from following the fleeing subway passengers and pays for it with his life.
Two deaths in Friday the 13th films come from heroic sacrifices; Jason Goes to Hell: The Final Friday has Duke handcuffing himself into Jason to slow him down and Sgt. Brodski in Jason X catches Uber Jason in the vacuum of space and drags him into Earth Two's atmosphere, burning them both up.
Mitch: Alright, who's with me on the understanding that if this plan fails, you all get to beat the crap out of me?
crowd becomes very enthusiastic
Near the end of the hospital battle in Hard Boiled, two of the SWAT team officers charged with getting the newborns safely out of the building use their kevlar vests to protect the babies. Immediately after securing the infants inside of the vests, they're riddled with bullets that they might otherwise have survived.
Subverted in Mystery Team with Jason getting shot trying to calm down his friends and convincing the shooter to let them go.
Buck the silverback gorilla in Rise of the Planet of the Apes. When the helicopter starts shooting down the apes, Buck knocks Caesar out of the line of fire and leaps at the aircraft, taking multiple and fatal gunshot wounds but succeeding in destroying it.
In the movie Phantom of the Paradise, the first song is about a singer who kills himself to get the money for his sisters life saving operation. Later Winslow sacrafices himself to save Phoenix.
The two main characters Chris and Theta in Alien Cargo, who choose to remain in their dying spaceship to prevent a dangerous virus from reaching civilization.
In the climax of Cowboys and Aliens, Ella went into the core of the aliens' spaceship and activated the bracelet's self-destruct bomb, knowing theres only a couple of seconds for the bomb to go off.
In Stranger Than Fiction Harold Crick discovers from his author that his fate is to die by pushing a child out of the way of a car, taking its place. Accepting it as a good way to die, he does so. Subverted in that he survives the collision because his author rewrites the ending.
At the end of Sherlock Holmes A Game Of Shadows, Moriarty tells Holmes that he will kill Watson and his wife for Holmes' destroying Moriarty's plans. With Holmes too injured to fight, he bear hugs Moriarty and forces them both over the Reichenbach Falls, saving his friend from Moriarty's wrath.
Sucker Punch has two heroic sacrifices Babydoll and Rocket sacrifice themselves for Sweet Pea, who had the best odds in the real world.
The thirteen samurai who accept the suicide mission of assassinating Lord Naritsugu in Thirteen Assassins. The chances of survival are almost nil and they know this going in—they fight not for money or fame, but to kill a monster who is a threat to all of Japan.
Yinsin sacrificing himself to buy Tony time in the first "Iron Man"
In The Avengers, Tony sacrifices himself by catching the nuke headed for Manhattan and flying it out into space through the wormhole, fully expecting to be trapped there and die, after Natasha warned him it was a "one-way trip" (he survives, but only due to luck — he loses consciousness and plummets back through the wormhole just before it closes). Also a Call Back to his argument with Steve earlier in the film, when the latter accused him of being incapable of sacrificing himself for someone else.
Battle In Outer Space. Iwomura feels guilty over blowing up one of the two Earth rocket ships while under Natalian Mind Control. He gives his life fighting off the attacking Natalian saucers so the remaining Earth ship can escape.
Bait 3 D. When an exposed power cord is threatening to almost electrocute everyone if it comes in contact with the water, Jessup sacrifices himself to shut off the power.
By Dawn's Early Light— the flight crew of Air Force One turn their plane so that the pursuing Looking Glass plane can ram them, to prevent the nuclear submarine fleet from receiving orders from a rogue President that would catastrophically escalate the nuclear war in progress. The movie ends right before the impending collision.
In Blood Diamond Danny Archer allows Soloman to escape with the diamond, he makes a final stand against the approaching soldiers.
Titanic: Jack allows Rose all the room on the floating door leaving most of Jack's body dangling in the freezing water which leads to his death.
In Wreck It Ralph, Ralph pulls this off to set off a volcano of Mentos and Diet Soda to act as a beacon to lure away the Cy-Bugs invading the Sugar Rush game, also taking out King Candy/Turbo in the process. Of course, he didn't expect Vanellope to quickly master her glitching to use it as a Teleport Spam to rescue the big guy in the end.
In Kung Fu Panda 2, a large part of the plot is about Po trying to find out what happened to his real parents. Near the end, he finally remembers that his mother hid him in a basket of radishes, then sacrificed herself to draw away the wolves that had destroyed their village.
This forms part of Jack's backstory in Rise Of the Guardians. Back when Jack was human, he and his little sister were out on a frozen lake when the ice began to crack beneath her feet. Jack then used his staff to swap their positions, getting his sister out of danger, and falling through the ice himself.
At the end of They Live, Nada destroys the alien transmitter to free mankind, knowing full well that he'll be shot and killed by the aliens in response.
Subverted than reverted in "When the Last Sword is Drawn": During the Shinsengumi's final stand, after the Emperor's forces have arrived Yoshimura draws his katana and wakizashi, makes a bad-ass final speech, then charges at the lines of riflemen, who open fire on him. Due to a particularly thick fog of war, Saito never sees what becomes of Yoshimura, and assumes he is dead. That is, until years later when he meets the son of Yoshimura's best friend who tells him Yoshimura somehow survived the charge (though he is terribly wounded) and was later forced to commit seppuku when the Imperial forces threatened to suppress any clan who gave aid to rebel soldiers.