The book centers on a boy, Bastian Balthazar Bux, neglected by his father after the death of Bastian's mother. While escaping from some bullies, Bastian bursts into the antique book store of Carl Conrad Coreander, where he finds his interest held by a book called The Neverending Story . Unable to resist, he steals the book and hides in his school's attic, where he begins to read.
The story Bastian reads is set in the magical land of Fantastica, ruled by the benevolent and mysterious childlike Empress. A great delegation has come to the Empress to seek her help against a formless entity called "The Nothing". The delegates are shocked when the Empress's physician, a centaur named Cairon, informs them that the Empress is dying, and has summoned a boy warrior named Atreyu, to find a cure. To Atreyu, the Empress gives AURYN: a powerful medallion that protects him from all harm. At the advice of the giant turtle, Morla the Ancient One, Atreyu sets off in search of an invisible oracle known as Uyulala, who may know the Empress's cure. In reaching her, he is aided by a luckdragon named Falkor, whom he rescues from the monster 'Ygramul the Many'. By Uyulala, he is told the only thing that can save the Empress is a new name given to her by a human child who can only be found beyond Fantastica's borders.
As Falkor and Atreyu search for the borders of Fantastica, Atreyu is flung from Falkor's back in a confrontation with wind giants and loses AURYN in the sea. Atreyu lands in the ruins of Spook City, the home of various wicked creatures. Injured by the fall and stranded in the dangerous city, Atreyu finds the wolf Gmork, chained and near death, who tells him that all the residents of the city have leapt voluntarily into the Nothing. There, thanks to the irresistible pull of the destructive phenomenon, they have become lies and delusions in the human world. The wolf also reveals that he is a servant of the Nothing who wishes to prevent the Empress's chosen hero from saving her. Gmork then reveals that when the princess of the city discovered his treachery against the Empress, she imprisoned him and left him to starve to death. When Atreyu announces that he is the hero Gmork has sought, the wolf laughs and succumbs to death. However, upon being approached, Gmork's body instinctively seizes Atreyu's leg in his jaws. Meanwhile, Falkor retrieves AURYN from the sea and arrives in time to save Atreyu from the rapid approach of the Nothing.
Falkor and Atreyu go to the Childlike Empress, who assures them they have brought her rescuer to her; Bastian suspects that the Empress means him, but cannot bring himself to believe it. When Bastian refuses to speak the new name, to prompt him into fulfilling his role as savior, the Empress herself locates the Old Man of Wandering Mountain, who possesses a book also entitled The Neverending Story , which the Empress demands he read aloud. As he begins, Bastian is amazed to find the book he is reading is repeating itself, beginning once again whenever the Empress reaches the Old Man—only this time, the story includes Bastian's meeting with Coreander, his theft of the book, and all his actions in the attic. Realizing that the story will repeat itself forever without his intervention, Bastian names the Empress 'Moon Child', and appears with her in Fantastica, where he restoresits existence through his own imagination. The Empress has also given him AURYN, on the back of which he finds the inscription "DO WHAT YOU WISH".
For each wish, Bastian loses a memory of his life as a human, and some of his ability to leave Fantastica. Unaware of this at first, Bastian goes through Fantastica, having adventures and telling stories, while losing his memories. In spite of the warnings of Atreyu and Bastian's other friends, Bastian uses AURYN to create creatures and dangers for himself to conquer, which causes some negative side effects for the rest of Fantastica. After encountering the wicked sorceress Xayide, with the mysterious absence of the Childlike Empress Bastian decides to take over Fantastica for himself, but is stopped by Atreyu, whom Bastian grievously wounds in battle. Ultimately, a repentant Bastian is reduced to two memories: those of his mother and father, and of his own name. After more adventures, Bastian must give up the memory of his parents to discover that his strongest wish is to be capable of love and give love to others (namely his own father).
After much searching, and on the verge of losing his final memory, Bastian is unable to find the Water of Life with which to leave Fantastica with his memories. Here, he is found by Atreyu. In remorse, Bastian lays down AURYN at his friend's feet, and Atreyu and Falkor enter AURYN with him, where the Water of Life demands to know Bastian's name, and if Bastian has finished all the stories he began in his journey, which he has not. Only after Atreyu gives Bastian's name and promises to complete all the stories for him does the Water of Life allow Bastian to return to the human world, along with some of the mystical waters. He returns to his father, where he tells the full tale of his adventures, and thus reconciles with him. Afterwards, Bastian confesses to Coreander about stealing his book and losing it, but Coreander denies ever owning such a book. Coreander reveals he has also been to Fantastica, and that the book has likely moved into the hands of someone else. This, the book concludes, "is another story and shall be told another time".