The story takes place on the Discworld, a planet-sized flat disc carried through space on the backs of four huge elephants - Berilia, Tubul, Great T'Phon and Jerakeen - who themselves stand on the shell of Great A'Tuin, a gigantic sea turtle. The surface of the disc contains oceans and continents, and with them, civilizations, cities, forests and mountains.
The story begins in Ankh-Morpork, the biggest city on the Discworld. The main character is an incompetent and cynical wizard named Rincewind, who is hired as a guide to the rich but naive Twoflower, an insurance clerk from the Agatean Empire who has come to visit Ankh-Morpork. Initially attempting to flee with his advance payment, Rincewind is captured by the Patrician of Ankh-Morpork, who forces him to protect Twoflower, lest the tourist's death provoke the Agatean Emperor into invading Ankh-Morpork. After Twoflower is kidnapped by a gang of thieves and taken to the Broken Drum Pub, Rincewind stages a rescue alongside the Luggage, an indestructible, enchanted and sentient chest belonging to Twoflower. Before this, Twoflower convinces the Drum's barman to take out a fire insurance policy; the barman subsequently attempts to burn down the Drum in order to claim the money, but ends up causing a fire that destroys the whole of Ankh-Morpork. Rincewind and Twoflower escape in the chaos.
Rincewind and Twoflower travel towards the city of Quirm, unaware that their adventures on this journey are actually the subject of a boardgame played by the Gods of the Discworld. The pair are separated when they are attacked by a mountain troll summoned by Offler the Crocodile God. The ignorant Twoflower ends up being led to the Temple of Bel-Shamharoth, a being said to be the opposite of both good and evil, while Rincewind ends up imprisoned in a dryad-inhabited tree in the woods, where he watches the events in Bel Shamharoth's temple through a magical portal. The pair are reunited when Rincewind escapes into the temple through the portal, and they encounter Hrun the Barbarian, a parody of heroes in the Swords and Sorcery genre. The trio are attacked and nearly killed by Bel-Shamharoth, but escape when Rincewind accidentally blinds the creature with Twoflower's magical picture box. Hrun agrees to travel with and protect Twoflower and Rincewind in exchange for heroic pictures of him from the picture box.
The trio visit the Wyrmberg, an upside-down mountain which is home to dragon-riders who summon their dragons by imagining them, and are separated when the riders attack them. Rincewind escapes capture but is forced by Kring, Hrun's sentient magical sword, to attempt to rescue his friends. Twoflower is imprisoned within the Wyrmburg, and because of his fascination with dragons, is able to summon one greater than those of the Wyrmberg riders, who he names Ninereeds, allowing him to escape captivity and save Rincewind from being killed in a duel with one of the three heirs of the Wyrmburg. Hrun meanwhile is enlisted by Liessa, another of the heirs, to defeat the other two heirs in mortal combat so that he may rule the Wyrmberg alongside her, with Liessa intending to use him as a puppet ruler. Despite refusing to ride a dragon, Hrun defeats both the brothers and has them banished from the Wyrmburg. Unaware of these events, Twoflower, Rincewind and Ninereeds snatch Hrun, but as they attempt to escape into the skies, Twoflower passes out from the lack of oxygen, causing Ninereeds to disappear. Hrun is saved by Liessa, but Rincewind and Twoflower find themselves falling to their deaths. In desperation, Rincewind manages to use the Wyrmberg's power to temporarily summon a passenger jet from the real world, before he and Twoflower fall into the ocean.
The two of them are taken to the edge of the Discworld by the ocean currents and nearly carried over, but they are caught by the Circumfence, a huge net built by the nation of Krull to catch sea life and flotsam washed in from the rest of the Discworld. They are rescued by Tethis the sea troll, a being composed of water who had fallen off the edge of his own world and onto the Discworld, where he was subsequently enslaved by the Krullians. Rincewind and Twoflower are then taken by the Krullians to their capital, where they learn that the Krullians intend to discover the sex of Great A'Tuin by launching a space capsule over the edge of the Disc, and plan to sacrifice Rincewind and Twoflower to get the god Fate to smile on the voyage, Fate insisting on their sacrifice after they caused him to lose the earlier game. Rincewind and Twoflower attempt to escape, but end up stealing the capsule, which is launched with Twoflower inside, the tourist wishing to see the other worlds of the universe. Rincewind is unable to get into the capsule in time, and falls off the Disc alongside it, the Luggage following them soon after.
The story segues immediately into the beginning of The Light Fantastic ; the two books can therefore be seen as one two-volume novel.