Richard Tyler, a pessimistic 10-year-old boy, is known for viewing life through a lens of statistics and fears, often doubting everything around him. His parents, eager to help him overcome his anxieties, have tried various methods to boost his confidence, but with limited success. One day, Richard is tasked by his father to buy a bag of nails for building a treehouse, a simple errand that turns into an unexpectedly transformative experience. On his journey, he gets caught in a harsh thunderstorm and takes refuge in a nearby library, where his adventure truly begins.
Despite Richard’s initial protests, he encounters Mr. Dewey, the eccentric librarian and custodian who insists that he needs a special book and hands him a library card. As Richard searches for a phone, he notices a large rotunda adorned with paintings of famous literary characters. Clumsy and unsteady, he slips on a wet patch from his raincoat and falls, losing consciousness. When he awakens, he observes that the artwork surrounding him appears to be melting, gradually transforming the library into a vivid, living illustration.
In this strange new world, Richard is greeted by the Pagemaster, a mythical figure who serves as the Guardian of Books and Keeper of the Written Word. The Pagemaster explains that Richard’s journey is part of a special quest. To find his way out, Richard must follow the path marked by a green neon exit sign, which leads him into the fiction section of this enchanted library. Along the way, he befriends three anthropomorphic books, each embodying a different genre: Adventure, a swashbuckling, pirate-like book; Fantasy, a sassy yet caring fairy-tale book; and Horror, a spooky "Hunchbook" with a misshapen spine. These books agree to help Richard if he checks them out using his library card, and they set off together on their quest.
As they explore, they encounter a series of classic fictional characters and perilous situations. One such encounter involves Dr. Jekyll, who transforms unexpectedly into Mr. Hyde, forcing the group to venture into the dangerous Land of Adventure. During this voyage, they are separated after an attack by the mighty Moby-Dick, engaging in an intense battle with the legendary whale. Richard and Adventure are shipwrecked and rescued by the Hispaniola, a ship captained by Long John Silver. The pirates head to Treasure Island searching for gold, but find only a single coin, leading to tension and the threat of mutiny. The Fantasy and Horror books arrive just in time to defeat the pirates, and Silver even tries to persuade Richard to leave with him—only to surrender when Richard threatens him with a sword.
In the fantasy realm, Richard spots an exit sign atop a mountain but accidentally awakens a dormant, menacing dragon due to Adventure’s clumsy interference. Richard attempts to fight the creature with a sword and shield but is swallowed by the beast. Luckily, he discovers books within the dragon’s stomach and uses a magical beanstalk from Jack and the Beanstalk to escape. Climbing the beanstalk, Richard and the books reach a dark, mysterious room where the Pagemaster awaits. At this point, Richard confronts the Pagemaster, accusing him of causing the terrifying events he faced—even suggesting that some dangers could have cost him his life.
The Pagemaster reveals that the journey was designed to help Richard confront and face his fears. As he begins to understand, characters from his adventures—Dr. Jekyll, Captain Ahab, Long John Silver, and the dragon—appear in a magical, swirling twister, congratulating him on his bravery. The Pagemaster then swoops Richard and the books into the twister, returning them to the real world.
Richard wakes up in the library, and to his relief, Adventure, Fantasy, and Horror are seen lying beside him as real books. The kindly Mr. Dewey allows him to check out all three books—breaking library rules just this once—symbolizing his newfound bravery and curiosity. Upon returning home, Richard is a transformed boy, now more confident and less fearful, sleeping peacefully in his new treehouse with his books, much to the curiosity and delight of his parents.
This story emphasizes the importance of facing fears, embracing imagination, and discovering that courage often begins with a single step outside one's comfort zone.