The movie starts by explaining how the King of England had died and no one know who was rightful heir to the throne. But a miracle appeared in Excalibur, a mighty sword mounted in a stone and anvil outside of a church with an inscription deeming whosoever pulls it free is rightful king. After many attempts failed, the legend was eventually forgotten.
Merlin the wizard had a premonition (while smoking his pipe) that he would meet a young boy whose path he must help guide. He soon meets a young orphan boy who says his name is Arthur, but everyone calls him "Wart." Merlin maintains the boy's nickname as he has seen bits and pieces of the future. Merlin accompanies Wart to the castle where he lives with surrogate "father" figure Sir Ector and his son Kay.
News from London tells of a knight's tournament to decide the future ruler of England. Sir Ector, agrees to let Wart go to the tournament as Kay's squire. He later renegs after Wart mouths off on him for not giving Merlin a fair shake.
Throughout the movie, Merlin and his owl Archimedes encourage Wart to educate himself, even though all Wart wants to do is be a squire to his adopted brother Kay.
Wart expresses interest in animal behavior, and so Merlin turns him into a fish, a squirrel, and finally a bird to show him how animal instincts differ from human desires (such as the instinct to eat and seek a mate versus the human desires of choice). As a bird, Wart falls into the house of the witch Mad Madame Mim, a nemesis of Merlin's. Merlin arrives and engages in a wizard's duel with Mim, ultimately infecting her as a rare disease.
Back on the homefront, Kay's squire comes down with the mumps, and Wart is given the privilege by default. Merlin is so enraged that Wart is putting aside the education he had offered to be a "stooge for that brute" that he shoots himself off to Bermuda in the 20th century, leaving Wart alone with Archimedes.
At the tournament, Wart realizes that he forgot to bring Kay's sword, and runs to find a replacement with Archimedes. They come to a sword in a stone and anvil in a churchyard. Because Wart wants the sword for someone else, and not for his own glory, Excalibur is effortlessly removed, and shines in the divine light of Heaven. The tournament is stopped when it is learned that the sword has been pulled from the stone. Although doubtful at first, Sir Pellinore and another knight encourage Wart to pull the sword again, and he does.
All kneel to their rightful king, although Wart has no idea what being king will mean. When asked his name, Sir Ector rightfully says "Arthur," which leads the crowd to hail him as King Arthur!
In the final scene, Arthur is so worried about what to do that he calls on the only person who always steered him in the right direction, and Merlin appears dressed as a 20th century tropical vacationer. But Merlin assures Arthur that this was what was supposed to happen all along, and that he may eventually have a motion picture written about him.