Firedrake, a young dragon, and his dragon friends are warned by Rat that humans are building a road that will soon lead to their home. Slatebeard, the oldest dragon among them, recalls his home from long ago where they might be safe from the humans, but many believe the Rim of Heaven is a myth. Firedrake decides he will find the dragons’ homeland and return to bring the other dragons to safety. His friend Sorrel, a brownie, agrees to go with him. Rat tells them to find his uncle, a white rat in a nearby city. He will help them locate the Rim of Heaven.
Sorrel and Firedrake hide in an abandoned warehouse where a young urchin named Ben lives. Ben offers to help Sorrel find Rat’s uncle Gilbert. Gilbert provides a bit of direction and warns them that ravens have been searching for the Rim of Heaven as well. Much to Sorrel’s annoyance, Firedrake invites Ben to join them on their journey.
Dwarves tell Ben a ruined castle in the distance is inhabited by something evil. One of the dwarves, Gravelbeard, sneaks away to tell Nettlebrand, the dragon hunter that lives inside the castle, about Firedrake. Nettlebrand orders his servant, Twigleg, to follow Firedrake to the other dragons and report back to him.
Firedrake and his friends make an emergency landing in Egypt during a storm, and an archaeologist captures Sorrel. Twigleg is captured as well. Ben frees Sorrel and Twigleg, but they get lost in the woods. One of the scientists, Professor Greenbloom, saves Firedrake from a basilisk. Greenbloom tells them of his friend Zubeida, who may have discovered something to help dragons fly when there’s no moonlight to give them energy.
He recommends they find Asif, a powerful djinn, who has the answer to every question. Twigleg reports this news to Nettlebrand, then hides in Ben’s backpack to avoid detection. Greenbloom gives Firedrake a golden scale he found on one of his journeys; he’s hoping the dragon might be able to find the creature to which it once belonged. Twigleg knows it came from his master, Nettlebrand.
Several days into their journey, Sorrel discovers Twigleg in Ben’s pack. She wants to cast him away, but Ben insists on letting him stay. Twigleg sneaks away to speak to his master, and Nettlebrand is furious to learn both Ben and Greenbloom have one of his scales. He attacks Greenbloom, but Gravelbeard helps him escape. Greenbloom learns that Nettlebrand is after Ben, Firebrand and Sorrel.
A few days later, they find the home of the djinn and summon him. He lets Ben look into one of his 1,000 eyes so he can see where the Rim of Heaven lies. Twigleg lies to Nettlebrand about the djinn’s answer, sending his master to a desert where the golden monster is attacked by a horde of sandmen who bury him in sand.
While flying over the sea, Firedrake and the others meet a friendly sea monster. She tells them about a golden beast that once attacked the dragons and offers to carry Firebrand and his friends to land. She takes them to the village where Zubeida resides. Ben is surprised to find Professor Greenbloom and his daughter, Guinevere, visiting with Zubeida. She takes them to the tomb of the dragon rider where Greenbloom’s wife, Vita, waits for them. Zubeida tells the tale of the first dragon rider, a young boy who went to live with the dragons. When he fell ill, a dragon breathed fire on him and healed him.
Twigleg finally admits to being Nettlebrand’s spy and begs for Ben and Firedrake’s forgiveness. Zubeida shows them the liquid of enchanted flowers she’s found that save the power of the moon. She provides some for their journey. She’s not certain it will give Firedrake the strength he needs to fly the distance. Firedrake and his friends set off, unaware that Nettlebrand is following them.
After several days, Ben is taken by a giant bird called a Roc. Sorrel and Twigleg give some of Zubeida’s flower water to Firedrake. The liquid restores his strength and allows him to save Ben. Sorrel and Twigleg find a rat flying a toy plane. She is Lola Graytail, Gilbert’s neice. She guides the group to the monastery they’ve been seeking, and they rendezvous with Professor Greenbloom and Guinevere. The monks give Ben a moonstone and guide him to the statue of a dragon.
When he shatters the stone against the statue, an ancient brownie named Burr-Burr-Chan appears. He tells them that the brownies of old made the cave where the dragons now reside. But the dragons have grown fat and old, too scared to leave their cave after the battle with Nettlebrand. Burr-Burr-Chan says he will guide them to the Rim of Heaven. They discover Gravelbeard has been spying on them. They know that Nettlebrand will be close behind. They must be careful not to lead him to the other dragons.
Lola and Twigleg fly her plane down to the lake near the cave entrance to distract Gravelbeard while Firebrand and the others slip into the cave. Twigleg and Lola take Gravelbeard hostage while the others discover that only one dragon — a small female named Mia — remains alive. The others have turned to stone.
Burr-Burr-Chan leads Twigleg, Lola and their prisoner to the cave. There, they discover that brownie spit, combined with dragon fire, will melt Nettlebrand’s scales, leaving him defenseless. Twigleg fillls Gravelbeard’s armor cleaner with brownie spit. He then helps the dwarf escape. As Gravelbeard polishes Nettlebrand’s armor for battle, he doesn’t realize he is actually weakening it.
Gravelbeard leads the golden dragon to the cave’s entrance. He is appalled when Nettlebrand admits he has no intention of rewarding the dwarf for his service. Instead, he wants Gravelbeard to remain his armor cleaner forever. The dwarf sneaks away from his master as they enter the cave.
Firedrake and his friends battle the great Golden One together. Nettlebrand’s golden armor melts to a puddle. Gravelbeard begs to be able to remain in the cave, which is granted. He wants to use his dwarf powers to restore it to its former glory and restore the lives of the petrified dragons.
Ben accepts Professor Greenbloom’s offer to live with him and his family. They will travel the world together looking for fantastical creatures. Twigleg accompanies them. Firedrake, Maia and the brownies will return to Firedrake’s home to persuade the other dragons to come back to the Rim of Heaven and be safe from humans. Several months later, the professor reads in the newspaper that a flock of huge birds was seen flying over the ocean. Ben and the professor know this was Firedrake and his friends flying to their new home.