A choice is offered: An afterlife of unending bliss, or a chance to return to mortal life. The offer could come from a god, an angel, or the spirit of a deceased love one. Often, it comes at the end of the hero's journey, or during a Near Death Experience towards the climax.
There are many reasons why this offer might be refused. Perhaps the character has Unfinished Business. Perhaps he feels it's his duty to return. The offer may have come at a time when the life of a loved one hangs in balance, or when the fight against the Big Bad has reached a pivotal point. Maybe the character simply feels that life is worth living.
In most cases, refusing the offer is portrayed as a heroic action. After all, the hero is sacrificing infinite happiness so that he can do what is needed. The sacrifice might be mitigated if the character knows he can eventually enter the afterlife he has refused anyway.
This might be an element of some stories involving Lotus Eater Machines, but there's a slightly different dynamic at play with a true afterlife. A character who figures out he's in a deceptive Lotus-Eater Machine might reject it on the basis that it's "not real", while a character rejecting a genuine Big Good certified Heaven knows that no truer happiness exists.
This is often a Death Trope and occasionally an Ending Trope, so expect spoilers.
Happened in the comic Grimjack — the title character died, but chose to leave Heaven and move into a cloned body to save a friend. And hunt down an old enemy. Consequences happen.
One of the several deliberately-incompatible origin stories of The Phantom Stranger says that he's the original Wandering Jew, who was doomed to walk the earth until Judgement Day after he was mean to Jesus at the crucifixion, and all his other powers were gained as he learned various kinds of magic in unsuccessful attempts to escape his doom. This origin story ends in the present day, where God tells him he's earned time off for good behavior and can go to heaven now, and he asks to stick around on Earth and keep helping people.
There was a brief period for The Punisher, starting with the Purgatory miniseries, where he was killed and then resurrected as an agent of heaven killing demons. Frank ultimately opted to return to life as a human because he preferred killing human criminals to slaying demons. Or re-uniting with his family.
Done as a bit of a Sadistic Choice early on to The Spectre; the Voice (implied to be God) says he's now earned the right to pass on to Heaven, a one time only offer... just as his love interest has a bullet speeding at her head.
A forced—and thereby perhaps subverted—version of this happened in X-Men—Gambit had been speared through with a sword and was lying on the ground slowly bleeding to death, literally walking towards a 'beautiful' white light and reassuring Rogue that he was in a state of grace and could finally go to Heaven—she grabbed him and yanked him back into his body, refusing to let him leave her behind. Needless to say, he was not happy about this.
In one Green Arrow story "Quiver", Ollie was already in heaven when his body was resurrected without a soul. The villain of the story wanted to possess the body as part of his evil plan to eventually claim the power of a demon. Ollie's body (which had a mind of his own based on Ollie's memories prior to the downward spiral leading to his death) tried to convince Ollie to merge with him again to fight the villain. Ollie refused at first, believing he had earned the right to rest. At the same time, Ollie's son Connor was desperately fighting the villain's summoned demons in an attempt to save Ollie. Ollie was convinced to merge with his body again. Not for himself, not even for the world, but for his son.
Upon her definitive death in Act VI, Felucia Sonsta is offered a place in Heaven, but instead explicitly requests to go to Hell so she can follow up on her earlier See You in Hell threat to Hokuto and the Kikion sisters and spend eternity making them suffer for torturing and molesting her. After the destruction of the Kikions' souls in the next arcs, Felucia accepts an offer of a Redemption Quest from the Lord of Hell to get into Heaven because, without them to torture, she sees no point in staying in Hell anymore.
In Act VI chapter 39, Akasha reveals to Moka that she has been Dead All Along; she was offered a place in Heaven by the Almighty, but refused to accept it because, having been indirectly responsible for Alucard's initial rise to power, she feels she needs to actually earn it.
Blood and Spirit: In chapter 37, upon being killed, Link unhesitatingly agrees to return to life without Zelda to stop Veress, willing to live without his true love for the sake of fulfilling his duty while knowing he'll eventually come back anyway. Having passed their test, the goddesses allow them both to return to life.
A non-heroic example happens at the beginning of All Dogs Go to Heaven, with the main character sneaking out of heaven despite the fact that he's warned that he can never return.
In Big Fish Edward Bloom follows an overgrown path through a dark and scary forest. He comes to Spectre, a beautiful, peaceful town full of friendly and happy people who cryptically inform him that he's 'early'. He hangs around for a little bit, but then decides to leave. He states that he'd be happy if he ended up there eventually, but he has to live his life first.
Another forced-and-thereby-possibly-subverted example: At the end of Constantine, the dying main character is about to enter heaven, when the devil deliberately heals him to make sure he has another chance at messing up his salvation on earth.
In the Disney version of Hercules, the titular Hercules chooses to remain on Earth with Meg instead of returning to Olympus.
In Star Trek: Generations Kirk is reluctant to leave the Nexus at first, but soon realized that the ability to make a difference in the real world was more important to him than anything the Nexus could offer. The tipping point is when he jumps a ravine with his horse, one he jumped numerous times in the real world, only to realize here that the element of danger which made it feel exciting when it was real is absent since he knows he's in the Nexus.
Purgatory: The single good-aligned bandit is dead and gets the chance to skip waiting in purgatory for ten years and go straight to heaven, but he decides to stay because the town needs a good sheriff.
In Terry Pratchett's Nation Locaha, the god of death, offers Mau the chance to ascend to the "Perfect World". Mau refuses, preferring to make his own world a little more perfect. Locaha notes with pride that everyone he's chosen has made the same choice.
At the end of the Chronicles of Prydain, Taran is offered the chance to sail to the Summer Country. He stays to help rebuild after the war, and becomes the new High King. Eilonwy also decides to stay with him.
The book version of ''The Spiderwick Chronicles plays it straight with Arthur Spiderwick now 120 years old due to living with the sylph for 80 years and after seeing his daughter (now 86 years old) one last time steps onto Earth and turns to dust.
Subverted in the film where Lucinda asks to go with Arthur and the sylph transform her back into her 6-year-old self so she can live with her father forever.
In Harry Potter and the Deathly Hallows Harry has a near death experience in which Dumbledore gives him the option to pass on to the next world. He returns to continue the fight against Voldemort.
In L. Jagi Lamplighter's Prospero Regained, Cornelius dies in the final battle, and is found standing over his own corpse. Not only are angels ready to escort him to Heaven, he can now see. His brothers are unable to persuade him to stay, but Miranda comments on how he can retire as he wished, and he puts off the angels and has his father resurrect him.
In an oddly similar case to the Hercules example, Percy Jackson of Percy Jackson and the Olympians refuses the offer to become lieutenant to his father, Poseidon, and gain eternal immortality. He refuses it on the grounds that he's about to enter high school and he doesn't want to lose the possibilities his mortal life gives him, but it's heavily implied it's so he can stay with Annabeth. Hardly surprising, since the series is published by Disney...
There was also the fact that he was basically being given a chance to get anything from the gods, and he wanted to do something to improve the general lives of most demigods.
There are a couple of other examples of this in the series. In the fourth book, Percy is given the choice to either stay on Calypso's island or return to his quest. In the seventh book/second book in the Sequel Series, He is given another choice to either live a long, peaceful life under the sea, or to jump into a new conflict, experience pain and suffering, and possibly die. While neither Calypso's island or the ocean were exactly paradise, they were both places Percy would have been very happy to live. It never takes him long to make the choice.
In the Gemma Doyle books, Gemma is gravely injured. She has to chose between dying and passing into the afterlife, honored as a hero, or being restored to life, granted one wish, and forgotten by time. She choses life, and wishes that her mentor/enemy be allowed into Heaven.
In The Silmarillion, Lúthien is given the choice between staying in the Undying Lands but being seperated from Beren forever, or returning to Middle-Earth with him as a mortal, and eventually dying a mortal death.
Later, the half-Elven Elros chooses to live as a human and forfeit his trip to the Undying Lands whereas his brother Elrond chooses to live as an Elf and eventually makes the trip in The Lord of the Rings. Unfortunately for him, his daughter Arwen decides to live as a mortal.
In Tamora Pierce's The Immortals - a part of her Tortall universe - Daine makes this choice at the end of The Realms of The Gods, deciding to remain in the mortal realms rather than become a minor goddess and live with her parents, the God of the Hunt and the northern Goddess of childbirth. It's not an easy choice; she did promise her mother she would stay - but in the end her parents understand that she has a life in Tortall and that was where she belonged.
Live Action TV
At the end of Ashes to Ashes, Alex believes herself to still be alive and happily exclaims to Gene that she can now leave his purgatory to go back to her daughter. Devastatingly, Alex reads from Gene's expression and through a hallucination, that she is infact dead and cannot go back.
Even after this, Alex still refuses to go to heaven as she wants to stay and help Gene. Gene convinces Alex that she has to go in, but that he cannot.
At the end of Season Eight's "Twilight" story arc, both Buffy and Angel choose to remain on Earth rather than live in a paradise dimension together for eternity. She realizes that her friends and family are fighting a unwinnable battle against demons, and despite Angel's pleas, Buffy returns to Earth to save them. Angel follows her.
The episode "Normal Again" offers up a suggestion that Buffy's life in Sunnydale is all a hallucination and she's actually a normal girl in a mental hospital. The episode ends with her choosing her life in Sunnydale and giving up the possibility of a normal life.
Stargate SG-1 has some examples with ascension. Daniel Jackson ascends and descends a couple of times for various reasons. It's not really heaven, but is an afterlife.
As a result, SG-1 has even parodied Daniel's multiple deaths.
Dean in the Supernatural Season 4 finale (as well as generally throughout season 5). It's more of a practical than a heroic decision, as paradise would require. letting Dean's brother, Sam drink gallons of demon blood to release Lucifer, starting the apocalypse and becoming inhuman in the process, and offering possession to Michael (which would essentially lobotomize him) to kill Lucifer in Sam's body, while wiping out half the earth's population in the process. It's also unclear exactly what would be so good about the paradise that would follow, as the angels only wanted it because they were dicks who were tired of ruling the world in God's absence.
"if heaven breathes, then someone trade places with me /
'cause I don't wanna tear feathers instead of rags"
"Sixteen Tons", first recorded by Merle Travis, has a twist to it:
Saint Peter don't you call me 'cause I can't go, I owe my soul to the company store.
Subverted in "The Third Heaven" by Carman. The narrator has a fatal accident and Jesus offers him a chance to return to life, but he decides to stay in Heaven.
Played with in Dream Theater's song "The Ministry of Lost Souls". The lyrics sound like they fit this trope, but the song is actually about a woman with survivor's guilt.
In Arms Tonite by Mother Mother, the singer, having just died in the arms of their lover, decides the romantic nature of the incident isn't worth being separated from their lover and fights to escape the afterlife and be reunited with them.
Religion and Mythology
In Buddhism, Bodhisattvas are enlightened souls who decide to reincarnate again to help others reach enlightenment.
Seen in the Saints of In Nomine, humans who have died and gone to Heaven but volunteer to return to Earth to continue the fight against Hell. Likewise, every human soul has the opportunity to climb Jacob's Ladder to reach the Higher Heavens and their ultimate reward but many linger on the lowest level ... in some cases, to help plan and organize the War.
In God of War Chains of Olympus, Kratos, ofallpeople, gives up spending eternity in Elysium with his daughter to save the world from Persephone.
In Heroes of Might and MagicIV, Tarnum from the Chronicles series finally redeems himself for the crimes of his first life and earns a place in the barbarian afterlife. He did this by guiding his foster son Waerjak (the player character in the Might campaign of IV) into reuniting the scattered barbarian tribes and making a new home for them on Axeoth while avoiding the mistakes Tarnum himself made in the past. Tarnum ultimately chooses to stay with his people and his son, having found a new reason to live.
Eternity. Another concept mortals can't seem to wrap their minds around.
In The Order of the StickRoy enjoys a peaceful afterlife with his family in Celestia following his untimely demise in battle. However, upon realizing that his allies have failed to resurrect him on schedule, he rushes off to search for answers rather than keep waiting in paradise.
In Futurama Bender dies and spends most of the episode as a Virtual Ghost. At the end he's offered the opportunity to go to Robot Heaven, but says "screw this!" and comes back to "life".