Purpose Driven Immortality

You are The Determinator. You have a mission in life, and you are going to accomplish it. You don't care how hard it is or who is standing in your way. You're going to do this, even if it takes a thousand ye...

What's that? It is going to take a thousand years? Well, phooey.

Fortunately, thanks to a bit of Applied Phlebotinum, even this won't stop you from reaching your goal. If you need a thousand years, you'll find a way to live a thousand years. Or ten thousand, or a million. However long it takes.

This trope is when someone is given an extended lifespan in order to accomplish a particular task. Until the task is accomplished, the character is immortal, but once it is, the character either dies or goes back to an ordinary lifespan. Usually, this is a source of relief for the character, because Who Wants to Live Forever?

Ghosts with Unfinished Business almost always have Purpose-Driven Immortality, with their spirits moving on as soon as the business is finished. A subtrope of Immortality. Compare Flying Dutchman, where characters are given immortality but no purpose to fulfill.

Anime

 * In Blade of the Immortal, an old woman specialized in giving kessen-chu, sacred worms who make anyone infested with them very hard to kill, and keep them as they were when they received this "gift". One way to remove these worms is to finish one important task.
 * Panty and Stocking With Garterbelt: Garterbelt literally cannot die (he's surprised to learn this when he's brought back in reverse from an explosion) until he's fulfilled whatever mission God has given him.
 * In Naruto, Orochimaru strives for immortality so he can learn all jutsu. According to his former friends, his goal was originally to live long enough to meet his dead parents' reincarnations. He became so obsessed with achieving this that he was willing to start crossing moral lines to become powerful enough to accomplish it, eventually becoming consumed by the pursuit of immortality and power as ends unto themselves.
 * Takashiro of Uragiri wa Boku no Namae wo Shitteiru takes a duras into his body in order to extend his life throughout multiple reincarnations of the villain. He tells the protagonist (also re-incarnated) that he intends for this fight to be his last, however.

Film

 * In Indiana Jones and the Last Crusade, the Grail Knight is given immortality in order to complete his mission in regard to the grail.

Comic Books

 * In The Crow, people are resurrected and given invulnerability until they've avenged their own or their loved ones' deaths.

Literature

 * In the Animorphs Megamorphs book Elfangor's Secret, the team learns that in return to being sent to the past to complete a mission, one of their members will have to die. Later, after the death of one of them, the rest of the team discovers that they can't be killed, because only one of them was meant to die on the mission, making them effectively immortal until the mission is completed.
 * In the Belgariad and related books, it's stated that wolves live "as long as they need to" and is implied that the same is true of sorcerers, given that they all have a mission from the gods to fulfill. But in the epilogue, none of them show any sign of getting ready to die off.
 * In The Dark Is Rising, as a punishment for betraying the Light, Hawkin is forced to become the Walker and carry the Sign of Bronze for seven hundred years. He's hounded by the Dark all the while, until the time comes for him to give it to Will Stanton, the last Old One.
 * Pete Hamill's Forever had a protagonist given immortality until he found his true love (as long as he didn't leave Manhattan).
 * This is the basic plot of the Indigo books. Princess Anghara releases seven demons from the Tower of Regrets, and is made immortal so she can re-capture them all.
 * Schmendrick from The Last Unicorn had a powerful magical gift, but none of his tutors were able to help him access it. Finally, out of frustration, one of the tutors cast a spell on him to make him immortal until he learned how to use his magic.
 * The Lord of the Rings: Gandalf the Grey returns as Gandalf the White because he hasn't yet finished his job of making sure the good guys win.
 * In the Morgaine Cycle, the titular heroine set up the gates to reset the physical ages of herself and her companion Vayne as they pass through them, so as to complete their mission of closing all gates in the network in question.
 * Glaeken from the Adversary and Repairman Jack novels lived for thousands of years without aging, so long as he was the Ally's champion. When he destroyed his foe Rasalom in The Tomb, his immortality left him and he began to age normally. Genre Savvy Rasalom had taunted him with the prospect that he might instantly age to dust if this happened, but the Ally wasn't quite so callous as to permit that.
 * This is the reason for the anti-aging spell on the Palace of Prophets in The Sword of Truth series: The sorceress at the Palace can train a wizard, but not very efficiently. The spell is necessary to ensure that the wizards and sorceresses live long enough to finish the training.
 * In one of the flashbacks chapters of the first Deverry novel, a young Prince Galrion, who had recently been renamed Nevyn, knelt before the grave of his ex-fiancee and swore that he would not rest until he had set right the mistakes that had led to her death, the death of her brother, and the death of another of her suitors. The gods made him keep that oath - he was around 450 when he finally died.

Live Action Television

 * The Inquisitor from the Babylon 5 episode of the same name was originally kidnapped from 19th century Earth. The Vorlons kept him alive for the purpose of interrogating would-be messiah figures. When he actually finds two who are worthy of being The Messiah in Sheridan and Delenn, he says that he hopes he is finally done and that the Vorlons will let him die.
 * Jiminy Cricket from Once Upon a Time. The Blue Fairy promises Jiminy that he will live as long as he needs to in order to help Geppetto.
 * The TV series New Amsterdam had a similar premise to Forever (see Literature) with John Amsterdam, where he would live as long as necessary to find true love (he didn't have the"don't leave Manhattan" part). It led to some plagarism accusations.
 * Stargate Atlantis had an episode where an alternate version of Dr. Weir used suspended animation to extend her life long enough so that she could see to the maintenance of Atlantis from the time the Ancients abandoned it until the time the team arrived.
 * The episode "The Vengeance Factor" of Star Trek: The Next Generation discusses a clan war in the history of the planet the Enterprise is visiting. A clan called the Lornak wiped out another clan, the Tralesta. To get their vengeance, the Tralesta survivors made their last member effectively immortal and made her the carrier of a virus to which only the Lornak were vulnerable.

Radio

 * In the radio version of The Hitchhikers Guide to The Galaxy, Wowbagger the Infinitely Prolonged at least thinks it's his purpose in life to insult everyone in the universe, and he does get his immortality revoked after insulting the last person on his list (the great prophet Zarquon). Does not apply in the novel (Life The Universe And Everything), where he was made immortal in a random accident and gave himself the task of insulting everyone in the universe because he'd run out of things to do to pass the time.

Religion
""Now there was a man in Jerusalem called Simeon, who was righteous and devout. He was waiting for the consolation of Israel, and the Holy Spirit was on him. 26 It had been revealed to him by the Holy Spirit that he would not die before he had seen the Lord's Messiah.""
 * Older Than Feudalism: The Gospel of Luke in The Bible has an example in Simeon.

- Luke 2: 25-26

Tabletop Games

 * The Risen Martyr class from the Dungeons and Dragons splat Book of Exalted Deeds resurrects a killed character, then kills them again as soon as they accomplish the goal they were resurrected for (or they reach the final level in the class and they can't multiclass further, though they can exploit the rule that says you don't have to level up). Intended for games with no resurrection but infamously bad in mechanics.

Video Games

 * in The Legend of Dragoon is given a charm to prevent aging in order to have enough time to atone for a mistake made during the original Dragoon War.
 * In Sly Cooper, the Big Bad Clockwerk's hatred and desire for revenge on the Cooper family keeps him alive.

Webcomics

 * In Girl Genius, the circus performer Embi made a sacred vow to see the world before he died, over 130 years ago. He takes his sacred vow seriously.
 * In Raven Wolf, the titular tribe was cursed with removal from the sacred circle of life until the domestic civilization is ended. This means that they stop aging at maturity and if killed, their bodies don't decompose and their spirits cannot be reincarnated until the curse ends; they also can't hunt or cultivate crops.
 * Rice Boy has those chosen to seek to Fulfiller: They will not die until the Fulfiller is found (as long they keep looking). In this case, it takes around 3,000 years. Of the three seekers, one continues on the quest until it is completed, one gave up long ago and performed a Face Heel Turn (and has moved on to other life-extending means), and the last became disillusioned with the quest itself, and decided to let mortality catch up to him.
 * In Tempts Fate, a B Side Comics to Goblins Life Through Their Eyes, the title character destroys a Demon who will take a thousand years to reform, after which the demon will enact revenge. However, as goblins only have a lifespan of 30 years, the demon "curses" him with immortality so that he'll still be around in a thousand years for said revenge.

Western Animation

 * On Gargoyles, Demona and MacBeth are made immortal by the Weird Sisters as part of a plan by the Archmage to conquer Avalon.
 * Both Demona and Macbeth agreed to become immortal (the latter also sacrificing youth to the former) in order to further their individual quests for revenge against a common foe. Appropriately enough, the terms of their immortality tie the two together in a cycle of revenge for hundreds of years,