During the main titles, Danny Kaye, dressed as a jester, sings the clever song, Life Could Not Better Be, with lyrics that are apropos to the actors or technicians who are being introduced. A narrator introduces the film while the audience sees a cadre of horsemen riding along the English coastline: "This is the story of how the destiny of a nation was changed by a birthmark, a royal birthmark, on the royal posterior of a royal infant child." Roderick the Tyrant had killed all of the royal family except for a baby boy who survived and has been cared for by a group in the forest. This band of loyalists to the throne is lead by a Robin Hood-type outlaw, the Black Fox (Edward Ashley). The scene changes to the castle where King Roderick (Cecil Parker) is considering an alliance with Griswold of McElwaine in which the King would offer his daughter, Gwendolyn (Angela Lansbury), as Griswold's bride. Gwendolyn is completely opposed to this arrangement. Back in the forest, the audience is led to believe the Black Fox is singing "(You'll Never) Outfox the Fox." He is assisted by a band of midgets, all in Black Fox outfits. However, soon the real Black Fox arrives and we learn that the person who was impersonating the Black Fox is Hubert Hawkins (Danny Kaye), a former carnival entertainer, and the midgets are his pals from the carnival. When the Black Fox reprimands Hawkins for wearing his clothes, he responds that he is only trying to improve the morale of the troops. Maid Jean (Glynis Johns), who is a Captain in the Black Fox's band of outlaws, enters to announce that a group of recruits is arriving. The Black Fox orders Hawkins to get the child - the royal child. Hawkins retrieves the infant and holds the baby on his shoulder to reveal the royal birthmark - the purple pimpernel - for the recruits to see so they will know the Black Fox and his gang are fighting to restore the rightful heir to the throne. The Black Fox orders Hawkins and the Captain to transport the baby to the Abbey in Dover for safekeeping. Hawkins disguises himself as an old man, while Jean transforms from the Captain into a lovely young maiden. They conceal the baby in a fake wine cask. When the King's men stop them on the road, Hawkins claims he is Foutzingdale, the wine merchant, and Jean is his granddaughter. After safely eluding the King's forces, a thunderstorm forces Hawkins and Jean to spend the night in a woodman's hut. Hawkins sings "Baby, Let Me Take You Dreaming," as a lullaby for the baby. Since there is only one straw bed, Hawkins and Captain Jean share it. Hawkins has always been attracted to Jean and she now warms to him. They kiss, but Jean resists. She says, "We daren't think of ourselves until our fight is won." Jean reveals to Hawkins the existence of a secret tunnel leading from the forest to the castle. The problem is it is locked at both ends and the key is in the King's possession. However, if they could get someone inside the castle that could access the King's chambers and retrieve the key, it could be opened so the Black Fox's forces could launch a surprise attack against King Roderick. Suddenly, their planning is interrupted by a stranger entering the hut seeking shelter. He introduces himself as Giacomo (David Carradine; Giacomo is pronounced "Jockamo"), "King of Jesters and Jester of Kings." He is headed for King Roderick's court to become his jester. Jean knocks out Giacomo so Hawkins can become the jester. The wicked Sir Ravenhurst (Basil Rathbone) has hired Giacomo as jester because he is also an assassin. So Hawkins assumes the identity of Giacomo and heads for the castle, while Jean and the infant king continue their journey to the Abbey. However, Giacomo's wagon loses a wheel, so he is delayed on the road and Jean runs afoul of the King's men who are scouring the countryside for the fairest wenches in the land. Therefore, Jean and the wine cart with the precious baby hidden inside arrive at the castle before the new Giacomo has finished repairing his cart. Once at the castle, Jean whistles a secret signal. A blacksmith responds to the signal and takes the child to safety. When Giacomo finally arrives, he sings "My Heart Knows a Lovely Song," which includes the whistle signal. When Giacomo hears the signal returned, he thinks it came from Lord Ravenhurst. Meanwhile, Princess Gwendolyn is fretting to the witch, Griselda (Mildred Natwick), about being forced to marry Griswold. Griselda reassures her that she is destined to wed someone else. When Griselda witnesses the arrival of Giacomo, she tells Gwendolyn he is her intended. Ravenhurst introduces Giacomo to the King. Their conversation about the Italian court is a classic Danny Kaye tongue-twister that ends with, "Yes! The Duchess dove at the Duke just when the Duke dove at the Doge. Now the Duke ducked, the Doge dodged, and the Duchess didn't. So the Duke got the Duchess, the Duchess got the Doge, and the Doge got the Duke!" The King is on his way to select a wench from those who have been recently rounded up by his men. Ravenhurst convinces the King to allow Giacomo to make the appropriate selection. During all of this, the blacksmith is desperately trying to identify himself to Hawkins as his contact. Shortly after Giacomo is shown to his room, the blacksmith comes there, but is interrupted by the arrival of Griselda. Using her evil eye, she hypnotizes Giacomo. He can be brought in and out of this trance by the snap of a finger. She sends him to make love to the Princess. The blacksmith, who has been hiding behind a curtain, has overheard everything. Meanwhile, Jean has made her way to the King's chamber and has found the key to the secret tunnel. As she is leaving, she runs into Giacomo, who is under Griselda's spell. Jean, unaware of the trance, gives the key to Giacomo. When the King arrives, he thinks Jean is Giacomo's choice from the wenches and immediately takes a fancy to her. Giacomo continues to the Princess' chamber. Gwendolyn discovers the key and assumes he has secured it for their escape from the castle. She keeps the key and gives him her silk handkerchief. In several instances, finger snaps bring Giacomo in and out of the trance with comic results. When he leaves Gwendolyn, Giacomo goes to Ravenhurst's chamber, where again finger snaps cause hilarious results. At one instant he is Ravenhurst's assassin-for-hire, at another he is in Griselda's trance as the super confident romancer, and at another he is Hawkins, the scared former carnival performer. When he leaves Ravenhurst, he returns to his room where Griselda puts him to sleep. Meanwhile, Jean is being dressed by ladies-in-waiting for her presentation to the King. She sends the attendants away when she hears the whistle signal from the blacksmith. She tells him to take the baby to the jester. Once Giacomo awakens, he is the jester again. When he arrives at the King's banquet room, he sees Jean seated next to the King. During this sequence, there is great deal of confusion: the blacksmith delivers the baby to Giacomo in a basket, Ravenhurst confuses Giacomo by talking about Plan 1 and Plan 2 in the assassination attempt, and Gwendolyn tells him to meet her at midnight at the north gate. When he finally realizes that the infant king is in the basket, he diverts everyone's attention away from the basket by singing "The Maladjusted Jester." During his performance, Griselda puts poison pellets in three flagons. Just as Jean retrieves the basket and is stopped by some guards, Giacomo proposes a toast to the King. As the guards turn to participate in the toast, Jean gets away. Sirs Brockhurst, Finsdale and Pertwee fall over dead when they drink from the poisoned flagons. Ravenhurst is very impressed by Giacomo's tactics. A page announces the arrival of Sir Griswold (Robert Middleton) at the castle. Jean hands the baby off to the blacksmith again. Griswold enters and accepts the terms of the alliance, but Gwendolyn tells her father she loves someone else and refuses to marry Griswold. She has presented her loved one with her silk handkerchief. Giacomo is arrested and they find Gwendolyn's silk handkerchief stuffed in his blouse. The King throws Giacomo, or whoever he is, in jail. When Ravenhurst learns that Giacomo is an impostor, he suspects he is the Black Fox. He recommends the King knight the jester so he can legitimately joust Sir Griswold. The winner, which should be Griswold, would marry Gwendolyn. The King quickly agrees. It usually takes years to attain knighthood, but Giacomo is rushed through the tests with comic ease. Jean approaches the King in his chamber while his dressers are grooming him. She gets him to dismiss his attendants and while she combs his hair, she retreives the key to the secret tunnel. The King also reveals to her the plans to knight the jester so he can be killed in the fight with Griswold. As soon as she gets away from the King, Jean gives the key to the blacksmith to get it to the Black Fox so he can attack. Just before the knighting ceremony, Jean warns Giacomo/Hawkins about the plot and urges him to run. He doesn't get away, however, and the ceremony begins. It is speeded up with hilarious results to allow the tournament to commence before it can be delayed by a storm that is brewing. Immediately upon being knighted, Hawkins is challenged to a duel to the death by Griswold. Gwendolyn expects Giacomo to be killed, so she warns the witch that if he dies, she dies. Therefore, Griselda puts poisonous pellets in the vessel with the pestle. One of Griswold's men overhears the plot and informs his master. In a scene full of tongue-twisting confusion, the "Vessel with the Pestle (or The Pellet with the Poison)" routine begins. Lightning hits Giacomo's suit of armor making it magnetic. During the hilarious joust, Griswold's weapon sticks to Hawkins' shield, so Hawkins pulls him off his horse and wins the joust. When he is proclaimed the winner, Ravenhurst accuses him of being the Black Fox and Jean as being his accomplice. They are arrested and taken to the castle for judgement. In the forest, the Black Fox and his men prepare to sneak inside the castle, but the secret passage collapses. The Black Fox immediately summons Hawkins' midget friends to infiltrate the castle first. As Hawkins and Jean stand trial, the midgets attack. Jean runs to raise the drawbridge so the Black Fox and his men can attack. Hawkins engages Ravenhurst in a sword fight. Griselda hypnotizes him again into believing he is a great swordsman. In the hilarious scene that follows, finger snaps cause him to alternate between a cowardly carnival performer and a master swordsman. Eventually, with the help of Jean, Hawkins bests Ravenhurst. Once the usurpers of the throne are defeated by the Black Fox and the army of midgets, the rightful King is revealed by the distinctive birthmark - the purple pimpernel. Hawkins embraces Jean and sings a reprise of "Life Could Not Better Be." As the film ends, Gwendolyn and Griswold can be seen in the crowd holding hands.