Minli lives with her parents, Ma and Ba, in a dusty town at the foot of Fruitless Mountain. Nothing grows, and the townspeople struggle to survive. Much to the chagrin of Minli’s irritable mother, Ba is always telling stories.
Ba tells Minli that a dragon once brought rain to Fruitless Mountain. When the people of the land failed to appreciate her gift, she took away the rain. The dragon’s children felt bad for the people of the now-desolate land and turned themselves into rivers. The broken-hearted dragon realized the error of her pride. Legend said that until she could be reunited with one of her children, the mountain would not thrive.
Ba also recounts tales of the mythical Old Man of the Moon, who binds people’s destinies and reads the knowledge of past, present and future in his Book of Fortune. As her parents struggle to keep enough food on their table, Minli gets an idea. She will go to the top of the Never-Ending Mountain, find the Old Man of the Moon and ask him to improve her family’s fortune.
A goldfish, which she purchases with one of her few saved coins, tells her how to find the Old Man. When Ma and Ba discover Minli is gone and see the note stating her intentions, they go after her.
Minli isn’t far into her journey when she finds a crying dragon. The monkeys in the nearby peach trees have tied him up, fearing he will steal their fruit. Dragon only wants to pass through. Minli rescues him, and he tells her the story of how he was brought to life out of a painting by a greedy ruler known as Magistrate Tiger.
Dragon is sad and perplexed that he can’t fly. Minli tells him about her quest and invites him to join her. She says maybe the Old Man of the Moon can help him fly.
As Minli’s parents pursue her, they meet a man selling goldfish in bowls. They tell him about their daughter’s impossible quest, and he believes it is possible to change the Book of Fortune. He tells a story about meeting the Old Man of the Moon himself.
The Old Man told him he would die at age 19. He did a kindness for the Old Man, who then changed the number of his years to 99. He gives Minli’s parents a talking goldfish in a bowl and urges them to trust their daughter’s efforts.
Minli’s parents ponder what to do. Ba says finding Minli is like trying to find the paper of happiness, and he tells his wife a story to illustrate: Magistrate Tiger once heard of a family overwhelmed with happiness. He sent his soldiers to demand the family members give him their secret. The grandfather of the family wrote something on a piece of paper, but it floated away from the soldiers before they could give it to the magistrate. Ba tells Ma that maybe Minli, like the secret of happiness, is not meant to be found. They decide to return home and wait for their daughter.
Minli and Dragon don’t know how to get past the monkeys. When Dragon mentions their greed, Minli gets an idea. She cooks some of the rice she’s brought with her and puts a net around it so the monkeys can’t reach it easily. As the monkeys try to get the rice and fight over it, Minli and Dragon slip past them. Minli tells Dragon she’s supposed to go to the City of Bright Moonlight, find the guardian of the city and ask for the borrowed line.
When they reach the city, Minli goes in alone. She learns the city is separated into two parts. The inner city is where the king lives, and she assumes he’s the guardian she’s seeking. A boy with a pet buffalo lets her stay with him and tells her about his friend, the Goddess of Weaving, who visits when the moon is full.
When the goddess arrives that night, Buffalo Boy asks her how Minli can find the king. The goddess’s directions help Minli sneak through a secret passage into the inner city, find the king and tell him her story. The king pulls out a slip of paper, which they both assume must be the borrowed line. It’s the same slip on which was once written the fabled secret of happiness. But now the writing on the slip of paper tells the king he can only lose what he clings to. He takes this as a sign to give the paper to Minli.
As Dragon waits outside the city, he watches some stone lions come to life. They say they are the guardians of the city, so he wonders if they know anything about the borrowed line. They give him a red string of destiny that they received from the Old Man of the Moon. When Minli returns, both she and Dragon wonder which item is the real borrowed line. They decide they must ask the Old Man of the Moon when they find him.
As they journey on, Minli is attacked by a giant green tiger. Dragon fights him off but receives scratches that make him sick. Minli goes for help. She runs into two young twins who lure the Green Tiger into a well to end his reign of terror. They say he was the spirit Magistrate Tiger. They tell a story about the tiger’s efforts to seek revenge on their ancestors, the family with the secret of happiness. The twins’ grandparents make a special concoction that cures Dragon of the Green Tiger’s poison.
When Dragon is well, the twins guide Dragon and Minli to Never-Ending Mountain. The twins tell a story about how their ancestors were saved from Magistrate Tiger when their home was miraculously moved to a place he couldn’t find. At the bottom of the mountain, with a flightless dragon, Minli realizes the only hope of reaching the Old Man of the Moon is by conveying a message to him. She ties the king’s slip of paper to the lions’ red thread and sends it up the mountain like a kite. When they pull the kite back, it has been turned into a thick silk bridge. Minli takes the bridge to the top of the mountain.
Back at Minli’s home, her parents wait anxiously for her. Ma’s heart begins to soften in the sorrow she feels without her daughter. She even starts to long for Ba’s stories, the ones she once scorned. She finally tells a story of her own about a bitter, selfish women who didn’t appreciate what she had until it was gone. She apologizes to her husband for her discontent and fears it is why Minli left them.
When Minli reaches the top of the mountain, a rabbit tells her the story of a man named Wu Kang, who is cutting a tree nearby. Nothing would ever bring him contentment, so the Old Man of the Moon finally sentenced him to cut this ever-regenerating tree until he learns his lesson.
Minli finds the Old Man sitting in a courtyard lacing thousands of red threads together. He says Minli may ask him only one question. She wants to ask how her family can improve their fortune, but she has also promised Dragon she will ask why he can’t fly. She looks at the king’s paper nearby and sees the word “thankfulness” written over and over again. She realizes this is her answer. She uses her one question to help her friend.
When Minli returns to Dragon, she removes a stone ball from his head as the Old Man instructed. Suddenly, he is able to fly. He deposits Minli near her village before flying back to a beautiful female dragon he’s seen. Still holding the ball, Minli returns home and slips into bed.
The next morning, her parents are overjoyed by her return. They look at the ball from Dragon’s head and recognize it as a highly-valuable dragon pearl. When they look out at Fruitless Mountain, they discover it has turned green and beautiful. Minli realizes all of her questions have been answered.
Two years later, the goldfish man visits Minli’s town. He sees it is prosperous, and all the people seem happy. He learns Minli’s family gave the dragon pearl to the king as a gift, and the king responded by providing gifts of seeds and farming equipment to the villagers. Minli’s mother, now warm and joyous, invites the goldfish man in. He listens to Ba telling the neighborhood children about Minli’s adventures and sees Minli gazing with a smile toward the place where the flourishing mountain meets the moon.