Told in an episodic structure, The Sword in the Stone starts with the story of Wart and his companion Kay, the son of local nobleman Sir Ector. They are educated in hawking, jousting, and various other activities together, but Wart's unknown parentage gives him a lower class status. He is in training to eventually become Kay's squire. He goes falconing with Kay who is shown to be impatient and carelessly lets his falcon get lost after failing to catch a rabbit. Wart travels to the woods in an attempt to find Kay's bird. He is nearly hit with an arrow and encounters King Pellinore, a hunter and nobleman, searching for a mythical creature called the "Questing Beast." Later, Wart finds the falcon and encounters a wizard named Merlyn and his owl Archimedes, both of whom agree to travel back to the castle with him. Merlyn becomes a tutor to both Wart and Kay, and immediately dislikes Kay's petulant behavior and favors Wart.
As these lessons begin, Merlyn gives Wart the opportunity to have some magical adventures. In the first of these, he transforms him into a perch and they swim in the castle's moat, encountering a fearsome pike. Following this, Kay and Wart go bowhunting in the woods and kill some rabbits. They encounter a crow and realize they are in proximity to a witch's cottage. The witch, Madam Mim, traps them in her home. They are able to escape with the help of a talking goat and the eventual arrival of Merlyn. Merlyn challenges Madame Mim to a magical duel. They transform into different forms and Merlyn is nearly defeated but narrowly wins by becoming a germ of disease.
Later, they practice jousting and Wart bemoans the fact that he will never become a knight. Following this, King Pellinore arrives and tilts against Grunmore Grummerson, a knight in the service of Ector. Pellinore loses and the match devolves into a brawl. After this, on a dreary day, Wart decides he wants to become a hawk, which Merlyn allows him to do. He runs into Cully, Kay's falcon, in a group of militaristic falcons and is forced to demonstrate bravery to them. He succeeds and is celebrated with a song from the company.
Kay expresses jealousy of Wart and his magical adventures. Merlyn tells them the story of a rabbi who walks with the prophet Elijah and is given a lavish welcome in a poor man's home and a stingy one in a rich merchant's home. Elijah causes the poor man's cow to fall ill and dies, while the merchant's wall is repaired by a mason. When asked why he did this by the rabbi, Elijah says he spared the poor man the loss of his wife while the repairs to the wall actually hid treasure from the rich man. Merlyn instructs Wart to take Kay on an adventure of their own.
On a walk through the forest, Kay and Wart encounter Little John, Robin Hood, and Marian, learning of their band as well as the kidnapping of their friends, Dog Boy, Wat, and Friar Tuck. They agree to help the group fight some griffins and wyverns if they can locate their friends. They follow Marian through the night and arrive at Morgan's castle, where they resist the temptation of desserts and rescue their friends. Following this, they battle against the wyverns and griffins. Wart kills a griffin and takes its head as a trophy, breaking his collarbone in the process. Their return is celebrated at the castle.
At the end of summer, Wart is turned into a snake and meets another snake who tells him the long narrative of his species. He recounts how there were two kinds of snakes, and the nonvenomous snake was killed by a man. Around the same time, Sir Ector receives notice that King Pendragon will be visiting his castle to hunt, which causes him a great deal of anxiety. When the party arrives, they are guided by Twyti, a downtrodden but experienced hunter, and Robin Hood. They encounter a boar that nearly gores Twyti and is killed by Robin. In the same hunting party, Pellinore finally succeeds in catching the Questing Beast, but is immediately upset when he sees the state it is in.
Later, Wart speaks to Archimedes about crows and is turned into an owl. He then has a mystical encounter with the goddess Athene at the "Tree of Dreams." After this, Merlyn takes the boys to see a giant. They narrowly escape being crushed by him and are saved by Pellinore and a revived Questing Beast who successfully fends off the giant. Six years pass and Wart struggles with what the future will hold for him as Kay's squire. He sulks before the ceremony and is turned into a badger by Merlyn. He then meets a hedgehog and a badger. Merlyn announces he will be departing soon as he has nothing left to teach the boys.
After Kay is knighted, King Pendragon dies and a sword stuck in an anvil appears outside a church in London, bearing the message that it will determine the next king of England. Everyone travels to London to try to pull it out. Wart, while looking for Kay's sword, accidentally removes it and, after some disagreement, is named king. Merlyn then reveals to him that he is Pendragon's son and that he has been looking out for him this entire time, trying to shape him into a just and noble monarch.