Selfless Wish

A character has one thing that he wants more than anything else in the world. He wants it so badly that he goes through great trials for the chance to be granted a single wish. (Or he may stumble across the means of making the wish by accident, as long as it's been clearly established that there's something he really wants for himself.) But when the time finally comes to make his wish, he decides to forgo his chance of getting what he wants and instead ask for something on behalf of someone else.

Often, if the original wish wasn't something completely frivolous, the character will (one way or another) be granted it anyway.

Anime and Manga

 * In Inuyasha it happens twice. Once in the backstory, Naraku expects Kikyo to use the Jewel of Four Souls to save her life (she takes it with her into the afterlife instead). This sets up the ending, where Kagome is trapped in the Jewel. Like Kikyo before her, Kagome doesn't make the selfish wish - she first refuses to make a wish, trusting in Inuyasha to find her, and when he does,.
 * The whole thing with summoning the Beast Gods in Fushigi Yuugi is this. You get three wishes, but there's a catch: you have to be strong-willed and pure enough not to let the Beast God you summon consume your soul, if you're the priestess. Typically, this means using the wishes to help others, not for your own happiness (the exception, of course being, perhaps a wish to get home safely.)
 * In one story of Pet Shop of Horrors, there was a man, Roger, running for president. Though charismatic, he was also arrogant and ungrateful, in contrast to his kind assistant, Kelly, who lacked Roger's charm. Kelly was in love with Roger's fiancée, Nancy, but they couldn't be together. But then Roger received a Kirin a powerful beast that could grant wishes. On the ride home, Kelly saw a bus full of children in danger and quickly stopped the bus from going over the cliff, but at the cost of his car going over. That was when the Kirin asked Kelly his wish. For a moment, Kelly thought of wealth, power and fame, but remembered Nancy and simply wanted to see her smile again. When he woke up, he was confused why Nancy was calling him Roger and telling him that Kelly was dead. Then he found out that he was in Roger's body. Because of his Heroic Sacrifice, he was guaranteed to become president and Nancy was technically now his fiancée. The Kirin saw that he passed the test and granted him everything.
 * In another story, a man is given guardianship over a "princess" staying with Count D. It turns out that said princess is an adorable little girl who has the ability to grant him great luck and thus win money through gambling. The man makes a number of selfish wishes for money, fame, and women, which leads to the girl becoming sad and him losing the luck she provided him. At the end of the story, he acknowledges that everything he had before wasn't really his, and just wishes for the little girl back. He gets her back in her true form (a kitten) and the ending implies that he will have lasting happiness with her through that.
 * A variant in Yu Yu Hakusho: Kurama, a demon who masquerades as a human, turns out to have stolen one of the three treasures of Spirit World so he can wish for it to save his human foster mother's life at the cost of his own. Yusuke, being a good-intentioned Idiot Hero, leaps in and tells the mirror to take his life instead. The wish is granted, and neither one dies: it turns out that two people trying to sacrifice themselves for the same wish nullifies the cost of making one.
 * It ends up doing that because the force behind the mirror makes it so. Presumably he could have taken either or both of their lives. Said force was just so impressed with them it spared both.
 * Deconstructed in Puella Magi Madoka Magica. It's something of a theme in the series that there is no such thing as a selfless wish. Everyone who makes a wish for someone else's happiness is also unconsciously hoping that it will also benefit themselves, even if only indirectly -- a fact which Mami, Sayaka , Kyoko , and Homura all fall afoul of. Also, because hope and despair balance out to zero, seeing the chance for that selfish expectation slipping away with the equivalent rising happiness already given to someone else sends a Magical Girl deeper into despair.
 * Quite a few times on Sailor Moon, Sailor Moon uses the Silver Imperium Crystal to make selfless wishes. She wishes Fiore could understand love. She wishes Luna could be human for one night. Her first wish was that all her friends were alive again and that they could all just be normal schoolgirls. She had to take back the second part of that wish when she realized it wasn't completely selfless, since it left the world open to attacks by outer forces, so Luna had to undo Usagi's Laser-Guided Amnesia and later the other girls's.
 * In Anatolia Story, Yuri is taken by the Black Prince as a prisoner of war, along with a good many other Hatusu soldiers. The Black Prince makes a deal with Yuri: if she can defeat a lion in combat, he will grant any request. If she succeeded, he expected her to request her freedom, with the plan that he would send soldiers to kill her in the desert as she was returning to Prince Kail. Instead, Yuri guesses his plan and instead requests that he treat the prisoners of war humanely.

Comic Books

 * One story in Sonic the Comic had Tails meet up with an anthromorphic unicorn who grants him a wish for saving him from the Badniks. True to his nature Tails wish is for Mobius to be free from Robotnik's rule. The Unicorn then takes Tails to a room looking down on Robotnik as he drives along in a parade. Tails is given a gun and told that if he shoots Robotnik Mobius will be free. Being who he is Tails throws the gun down and yells that it's wrong. The unicorn tells Tails that he made the right choice, and as long as he follows his good nature, one day, his wish will come true.

Fan Fiction

 * A Wish for Batman had Batman receive a wish in a crossover with Ah! My Goddess. After considering wishing for his parents or Dick's to be brought back to life, Batman ultimately wishes that his work as Batman would be complete and successful, and that Gotham would become safe under his watch. Following the reality warp that allowed his wish, Bruce discovers that not only has.

Film

 * The 2000 remake of Bedazzled had Brendan Fraser's character using his last wish on I Want My Beloved to Be Happy. This ends up.
 * In Disney's Aladdin, Aladdin uses his third wish to liberate Genie. This turns out to be the show of character that proves to Jasmine and the Sultan that Aladdin would indeed make a worthy husband.
 * This is a major theme in The Forbidden Door. The old dragon that grants wishes tells the children that when you wish for something for yourself, someone else must pay the price, but if you wish for something for others, you must pay the price. Nimian asks to keep his country safe. His price is  The children originally plan to ask for a bicycle and a trip to Venice, but realize how shallow they are. Later, they ask to repair their parents' relationship, and their price is
 * This provides the Crowning Moment of Heartwarming in Bruce Almighty. When God asks Bruce what he wants, Bruce replies that he wishes Grace find a man who may make her truly happy and see her through God's eyes, even if it is not Bruce.

Folklore

 * An old folktale has a guy who wants to ask one question, going to see a wise something-or-other who will answer three. On the way, he comes across three people in trouble, and ends up asking their questions instead of his own. As a result, he ends up fabulously wealthy and gets a girl.
 * In Irish folklore, there's a character named Kitty O'Shea who supposedly made a Deal with the Devil in order to feed starving people, and because her intentions were completely selfless, her soul was safe.
 * An old story has the Devil walking the earth, granting a nobody of a man a wish, with the perpetual underlying fear that this will be the one who, with an utterly selfless wish, will send him back to captivity in Hell. The little man wishes that, with no change whatever to himself, he would become the most spiteful, mean, self-centered man on earth. The Devil screams.
 * ...I don't get it, what's so selfless about that?
 * It's because he was a good person who wanted the world to be better. The only way to make him the most spiteful, mean and self-centered man on earth without changing him is to make everyone else less spiteful, mean, and self-centered than a man who was willing to give up a wish to make the world a better place for everyone. That would make a much nicer world, meaning the Devil not only has to go back to hell, but also has to contend with a much purer planet Earth.
 * Or the Devil could grant his wish by killing everyone more spiteful, mean and self-centered than him.
 * In most variations of that story, the Devil is able to subvert any wish that is selfish, but must follow the intent of any selfless wish. So he has to make the world better.

Literature

 * In The Master and Margarita, Margarita badly wants to find her vanished lover, but when the Devil offers to grant one request to thank her for having played hostess at his ball, she instead asks for mercy for one of the damned souls she met at said ball. It is then revealed that it was a Secret Test of Character, and, satisfied, Woland gives her the chance to formulate her real wish, which she does.
 * In Diana Wynne Jones' Deep Secret, Maree loses and she and her cousin Nick have to undergo a dangerous journey in order to gain one wish each (so she can ask for it back). Instead, she wishes that her father be cured of cancer, so Nick, in turn, has to give up what he was going to wish for and use his wish to help Maree.
 * In Arkady and Boris Strugatsky's Roadside Picnic, the hero does this at the end of the story.
 * Susan Cooper's The Dark Is Rising series novel Greenwitch: Jane and her companions are trying to retrieve an artifact of vital importance to the Light, which was lost in the first novel. When she first meets the Greenwitch in its inactive form, Jane is offered the chance to make a wish. Her wish is that the Greenwitch could be happy. At the end of the novel, the Greenwitch rewards Jane by returning the artifact to her.
 * Played with in Wizard's First Rule. A witch holds Richard's friends captive, and says she will grant him one wish. He must learn the location of a Cosmic Keystone from her. What does he do? He asks his friends to be released... aware that the witch needs him to know the answer.
 * A planned storyline in Buffy the Vampire Slayer would have had Buffy receiving one wish. She then would spend the episode considering how to use it, such as removing Angel's curse (which would enable them to have a relationship). But at the end of the episode, she decides to resurrect Tara, Willow's late girlfriend. Sadly, Amber Benson was unavailable.
 * in Wild Orchid, a retelling of the ballad of Hua Mulan, the emperor offers Mulan the deepest wish of her heart- anything she wants, he will grant. she realizes she could use this wish the way her father did, to wish for the chance to marry for love- but in her case, she doesn't know if the one she loves truly loves her. so rather than asking to marry Prince Jian, she requests that the emperor grant the deepest wish of Jian's heart, which is to be free to travel.

Video Games

 * Waku Waku 7: the profile of Robot Maid Tesse states that she wants to use the power of the Waku Waku Balls To Become Human, but her ending has her making a wish to heal the scientist who created her from his illnesses.
 * Deconstructed in Valkyrie Profile. In what is considered either the saddest or Narmiest recruitment scene, we're introduced to Yumei, a half-mermaid girl who is treated like shit by her fellow merfolk, especially once her mother dies. She then goes to find where her father was, and finds a fisherman and his son who save her. The fisherman's son, Fuyuki, talks about the legend of the Lapis Lazuli that grants a wish, and he wants to wish for a big ship. Upon finding out that Yumei's human father is dead, she decides to commit suicide but says goodbye to Fuyuki after revealing her mermaid form to him. Her tears actually turn into a Lapis Lazuli, and Fuyuki picks it up. Rather than wishing for a big ship like he wanted, he then says wishes for Yumei to be with her parents. Unfortunately, her parents are dead...
 * In Puzzle Booble Galaxy/Space Bust A Move, Bub and Bob's fairy assistant Snown performs a Heroic Sacrifice to stop the Big Bad. Having used up most of her magic to save the day, she starts to fade away in exhaustion though grants Bub and Bob one final wish of their choice in her dying breath. As they think, she notices she's stopped fading away. Bub and Bob take pride in their wish as the fully recovered Snown dances happily.

Visual Novels

 * Fate/stay night. Fate Route. That is all. Well, actually it isn't. It's a little different from the other wishes on this page, as the wish made is to She only has time to admit that she returns Shirou's love before being swept back to her time period and falls asleep, hoping that she will be able to see Shirou again. She dies in her sleep.
 * made one such wish by making a Bargain with Heaven, promising his eternal servitude to Gaia for the power to save a handful of people he was currently trying to rescue for no other reason than his inherent selflessness.

Western Animation
"Lisa I wish for world peace. Homer Lisa! That was very selfish of you!"
 * In an episode of Catscratch, Gordon sets out to defeat the Kracken in combat so it will grant him his wish (to have a bigger tail). When they find the Kracken, however, it rips of Mr. Blik's tail in the ensuing fight. When Gordon eventually wins, he wishes for his brother to get his tail back instead.
 * In Samurai Jack, there was a wishing well guarded by three extremely powerful masked archers. After Jack defeats them, and is about to wish to return home, the archers tell him that the well is cursed: they wished to become great warriors and the well forced them to become its guardians. Jack then wishes for the well to destroy itself and not endanger anyone again.
 * In another episode Jack attempts to rescue a trapped fairy that can grant any one wish (Including sending him home). When he is unable to free her (and himself as well) he says "I wish we were free".
 * Parodied in The Simpsons:


 * In American Dragon Jake Long, Jake makes the selfless wish of saving the day rather than seeing Rose again when given a magical transportation device. Really driven home when two portals open--the one he asked for aloud, and the one his heart asked for. Meaning he and Rose literally see each other.
 * A version of this also features as a Crowning Moment of Heartwarming. A short called "Seven wishes" features a girl named Jenny being given a magic flower that grants seven wishes, and each wish takes up one of its seven petals. Throughout the short, she teases a kid named Victor who is sitting on a bench reading a book instead of running around and playing. After several small wish-related adventures, she finally is reduced to just one wish and taunts Victor one time. Victor gets tired of her teasing, finally closes his book, then pulls out a pair of crutches from under the bench and starts to walk home. Jenny then uses her last wish for Victor to be healthy again.