The Mighty Thor: In a 1980s storyline, Thor and other Asgardians are being pursued by the forces of Hel as they rescue mortals from the underworld. The heroes realize they will not be able to escape and Thor says he will stay to hold them off and give the others time to escape. He is then knocked unconscious from behind by Skurge the Executioner, a long-time villain who has finally realized how foolish much of his life has been. Skurge takes Thor's place, singlehandedly holding off the demonic hordes and perishing in battle, and earns a place in Valhalla, the heroes' afterlife. You can't go wrong with a Norse god blowing apart Viking zombies with machine guns borrowed from Earth. Hela did try to keep Skurge in Hel, but realized that his act of heroism made his soul "too bright" for that dismal realm.
"They sing no songs in Hel, nor do they celebrate heroes. For silent is that dismal realm and cheerless. But the story of the Gjallerbru and the god who defended it is whispered across the Nine Worlds.
"And when a new arrival asks about the one to whom even Hela bows her head, the answer is always the same.
"He stood alone at Gjallerbru.
"And that answer is enough."
In an annual story in the MarvelTransformers Generation 1 comic set in Cybertron, Optimus Prime says exactly this to Megatron when the Decepticon leader attempts to attack Iacon. They both survive.
Kol Skywalker in Legacy, during the aptly named "Massacre of Ossus" says to a horde of Sith and stormtroopers: "I am Kol Skywalker, servant of the Living Force! None of you will pass!". As expected, he dies in battle.
Iron Man: Tony Stark in Earth X, knew that he had to keep the Celestials from destroying Earth just long enough for help to arrive. So, he turned his company into a huge Iron Man suit and he went off to fight them off. He was alone and had to fight off a horde of gods. He managed to live just long enough to see that he succeeded.
This was basically how Superman was killed in The Death of Superman arc. After getting his ass kicked across America while trying to fight Doomsday, he finally plants himself in Metropolis and refuses to budge, saying the only way Doomsday will ever destroy his city is to kill him first. Doomsday proceeds to do just that, but takes such a beating in the process that he dies as well.
Mongul blackmails Superman into retrieving a device called the Crystal Key. However Martian Manhunter was tasked with guarding and defending the crypt in which it was locked away. He was determined not to let Superman pass, but he failed.
Later The Spectre blocks Superman's path and declares he cannot go past that point. This time Superman cannot push him away.
The Spectre: I'm sorry, my friend — but I can permit you to go no further!
It happens in Red Daughter of Krypton when Sheko tries to read Supergirl's memories. A memory of Alura blocks her, declares firmly that her daughter's mindraping is NOT going to happen and throws her out:
Sheko: You... You can see me? Alura: OF COURSE I can see you. Now GET OUT of our home! Sheko: Who are you...? Alura: Alura Zor-El! Praetor of Argo City! And you trespass at your peril!
Exoristos says this word for word in Demon Knights #7 as she is the last person remaining that's protecting the village. Then the Big Damn Heroes arrive.
A rare version where the hero survives; In JLA/Avengers, during the final battle between the combined teams of heroes and the horde of villains under Krona's control, Wonder Woman orders the other heroes to press the attack while she takes on anyone or anything that would attack from the rear. Just as Surtur is about to advance on Wonder Woman, her mother Hippolyta and She-Hulk offer to help her out.
Parodied in Avengers Academy, when the Runaways try to sneak into the Academy and are caught by Juston Seyfort and his Sentinel. Upon learning that Sentinels kill mutants, tiny little Klara Prast elects to take on the big-ass robot to protect Molly Hayes. Thankfully, there was probably not much chance that anyone was going to die in this little misunderstanding, though it did lead to one of Klara's most hilarious lines.
Klara Prast: Run, Molly! I will restrain the automaton!
In Nemo: Heart of Ice, Ishmael stays behind to delay the pursuit of Janni and the others. He takes one of the ice schooners into the crevasse with him in a Heroic Sacrifice.
Happens in a very early arc of Prince Valiant. After being given the Singing Sword, Val uses it to stop Viking raiders who have abducted his beloved Ilene from crossing a bridge (pictured here) while his rival-turned-ally rides to get The Cavalry. He eventually passes out and is captured too, but at least lives to fight another day. Year. Decades.
In Annihilation, Drax the Destroyer and Cammi are about to board a ship with the forces of the Annihilation Wave hot on their heels. Over Cammi's protests, Drax stays behind to buy time for the ship to escape. As the ship takes off, Drax faces the oncoming army of alien horrors with nothing but his knife. He survives, and shows up later in the story to finally complete his mission of vengeance by ripping out Thanos' heart. Thanos doesn't return from the dead until much later.
Done again in Annihilation: Conquest, with Captain Universe fighting a swarm of Phalanx single-handed while Peter Quill and his team escape. Quill being Quill, his reaction is cynical.
Quill: Martyrdom's overrated, Gabe.
In an early issue of Black Science Kadir relays how Ward told him to run while Ward held the attackers off. He's lying, of course, but everyone's familiar with the trope so they don't question him.