At the beginning of Yu Yu Hakusho, delinquent Yusuke dies saving a child from being hit by a car, which puts the Celestial Bureaucracy in a bind: He was scheduled to go to hell, but his Heroic Sacrifice partly redeemed him... but not enough to qualify for heaven. He ends up working for them fighting demons.
In the Dragon Ball universe, it's said at one point that being killed by a demon brings you this. Whether it's true or is just a rumor is debatable, though. People said it about King Piccolo, who was later revealed to not be actually a demon.
The movie Ghost is all about this--some souls aren't ready for one place or the other at the time they part with the body, and the main character had some things to resolve on Earth before his soul could be at peace.
Disney's Peter Pan. Captain Hook is preparing to drown the Indian Princess Tiger Lily to force her to tell him where Peter Pan's hideout is. He threatens her with this trope as he does so.
Captain Hook: Remember, there is no path through water to the Happy Hunting Ground.
There's also the 1985 film The Heavenly Kid, where a guy killed in The Fifties is stuck in "Midtown", and has to perform some kind of deed before he can go "Uptown". And it turns out he has to play guardian angel to the son of his former girlfriend. (Oh yeah, and the guy she married was Niedermayer.)
In the Chalion series, anyone who doesn't get the proper funeral rite can't be taken up by the gods and ends up a lost soul, although they can be redeemed by a living saint. Shamans attach an animal spirit to their soul and need another shaman to separate the two when they die.
Meg in The Wish List dies with a perfect balance of good and bad deeds to her name, disqualifying her from both branches of the afterlife. She finds a way back to the mortal world and decides to help an old man fulfill his life's wishes in the hopes of earning enough karma to get into heaven.
In the Harry Potter series, ghosts are people who either refused or were too scared to accept death and move on. Apparently, there's no take-backs later on if you change your mind.
In The Hitchhikers Guide To The Galaxy, Arthur Dent mentions that he used to have a recurring nightmare where he died and there was a bureaucratic error: all his friends went to heaven or hell, but Arthur got sent to Southend.
In one of the Nightside novels, Sinner is an otherwise-good man who'd sold his soul to the Devil for true love. When he died and went to Hell, it was revealed to him that his "true love" was a succubus who'd only been pretending to care about him ... but he still loved her and was content with his end of the bargain, so much so that having him around subverted the basic premise of Hell. Rather than let a happy soul spoil the atmosphere of the place, the Devil kicked him out again, and Sinner wound up in the Nightside, back on Earth.
In Dante's Divine Comedy, those who refused to commit to a position in life were left to run back and forth in the borderlands, for even Hell won't take them in.
In The Lord Of The Rings, the Dead Men of Dunharrow are cursed to an undead life until they have fulfilled their oath to aid Gondor's king in battle.
This is how ghosts and zombies are created in Being Human. Ghosts usually die with some particular piece of unfinished business, and are unable to cross over until they can figure out what it is and fulfill it. Zombies are created when something unnatural blocks a soul's transition into the afterlife at the moment of death; body and soul don't separate properly, and the soul is forced to remain within the corpse for several weeks after death, until the body has decayed to the point that it simply can't sustain the soul anymore.
This ended up being the entire point of Lost. The characters were dead, and had to escape purgatory to go to heaven.
In the The Twilight Zone episode "The Hunt" a man does this to himself. He's allowed into heaven but he isn't allowed to take his dog with him. He decides that an afterlife without his dog is a fate worse than death (so to speak) so he refuses to enter and will just wander the path in between heaven & hell forever. Turns out that wasn't heaven, it was hell. Heaven allows dogs in.
In the short lived early Fox series Second Chance (not to be confused with the game showof the same name) Charles Russell dies in the Far Future of 2011, and learns he is too bad for heaven but too good for hell. He is given the opportunity to go back to his teenage years and become a mentor to his younger self (played by Matthew Perry). The second season drops the older Charles Russell character, and became a standard Sit Com called Boys Will Be Boys.
In Norse Mythology one can only get into heaven by dying in battle. This created problems in practice, as it would have either wiped out their population or required them to include a disproportionate number of frail old men in their raids. They eventually resorted to "cheating" by methods such as gently tapping the dying with a sword as they passed away.
Viking "heaven" was called Valhalla, and those who died of natural causes were sent to the realm of the goddess of death Hel (root of the English word Hell, but not as bad).
The legend behind the Jack o' Lantern involves a thief cursed with this after tricking Death.
Some of the Native American tribes from the great plains allegedly believed that mutilating someone's body after death would bar them from entering the afterlife, so they'd be forced to wander the earth as a spirit.
"The Soldier and Death" is a Russian folktale, retold in English by Arthur Michell Ransome and later used as an episode of The Storyteller. At the end of the story, the soldier having tried to enter both Hell and Heaven and being turned away from both, is left to wander the Earth forever.
In the Points Of Light setting for Dungeons And Dragons, honored servants of a god are supposed to go to his or her divine realm after death as Exalted. Due to the heavens being badly fractured, a large portion of these randomly end up on islands just outside their god's realm, completely blocked from entering by any mundane or magical means.
Dungeons And Dragons module I3 Pharaoh. The pharaoh Amun-re sacrifices the wealth and well being of his people to build himself a magnificent pyramid tomb.When he's threatened by an angry mob, he lays a curse that will cause the land to dry up if he is killed. A member of the mob kills him anyway, and the god Osiris is forced to carry out the curse. However, he punishes Amun-re by condemning his spirit to wander the land until someone steals his treasure from his tomb.
The plot of Castlevania Lords Of Shadow revolves around stopping the titular lords, whoa are (among other nastiness) barring the way for dead souls to heaven using an evil mask.
Souls in Final Fantasy X must receive a sending ritual from a summoner in order to reach the Farplane. Souls that don't get this ritual become Unsent (sentient undead) if they're lucky, otherwise, their jealousy towards living beings warps them into Fiends. This leads to some Fridge Horror: At the end of the game, there's no more summoners, since the Big Bad was powering them. The sequel reveals Fiends are still appearing, but no one is sure why. Someone's going to connect the dots and have a Heroic BSOD at some point...
The basis of Painkiller is that the main character has died, but cannot enter Heaven with his wife until he does some work for the angels and kill the generals of Hell.
In the Titan Quest expansion pack Immortal Throne, Hades' invasion of the mortal world causes Charon, the Styx's ferryman, to neglect his duties, resulting in the dead becoming stranded outside the afterlife. The player resolves this by killing Charon and presenting his oar to one of the trapped souls, allowing the soul to become the ferryman in Charon's place.
In Might and Magic: Heroes VI, dead souls are supposed to be delivered to the goddess Asha for reincarnation, but those who die particularly violent or unjust deaths can find themselves trapped in the mortal world as ghosts. Necromancers who worship Asha sometimes try to bring comfort to them, in the hopes that they can rejoin the cycle.
In Vagrant Story, anyone who becomes tainted by 'The Dark' is fated to die an incomplete death. For most people this means being reborn as a walking corpse, but some people, such as Sydney, and possibly Duke Bardorba, have studied and manipulated The Dark to such an extent that they've become functionally immortal.
In the video game Malice if you die you end up in a limbo stage where all you need to do is talk to the Grim Reaper who promptly sends the title character (a demigoddess) back to the living world (i.e. you restart the level you died on) simply because he doesn't want to deal with the complicated paperwork of processing a god.
In Touhou, we have Yuyuko Saigyouji, the princess of the Netherworld, the place where souls wait for their Reincarnation. However, because her body is being used to seal the Saigyou Ayakashi she cannot enter the cycle of reincarnation and is stuck forever as a ghost. She seems to be enjoying it, though.
Bleedman's Grim Tales From Down Below has Billy die and end up in Heaven. But the saints get fed up of him and kick him out (literally). Billy then ends up in Hell. But they get fed up of him there as well and he ends up wandering the Earth as a spirit.
In Yet Another Fantasy Gamer Comic, the gods of Man and the gods of Orc couldn't agree on who should claim Glon the half-orc, and he convinced them to send him back to life so he could determine which of his two heritages was his "true" one.
Glon's dying human father asked to be buried with three grave coins, instead of the usual two. This means that he was technically denied a proper burial, and therefore has an excuse to stick around as a ghost.
Five hats means that five tropers think it is ready to publish.
You are saying that you think this draft is ready to be published. That means the description is not ambiguous,
it doesn't duplicate an existing trope, there are at least three examples, and the title makes sense.
Is that what you meant to do?
You are saying this draft has a ready-to-publish hat it does not deserve and you are taking it back.