During the Blitz, three orphaned children named Charlie, Carrie, and Paul Rawlins are evacuated from London to Pepperinge Eye, where they are placed in the reluctant care of Miss Eglantine Price, who agrees to the arrangement temporarily. The children attempt to run back to London, but after observing Miss Price attempting to fly on a broomstick, they change their minds. Miss Price reveals she is learning witchcraft through a correspondence school with hopes of using her spells in the British war effort, and offers the children a transportation spell in exchange for their silence. She casts the spell on a bedknob, and adds only Paul can work the spell, as he is the one who handed the bedknob to her. Later, Miss Price receives a letter from her school announcing its closure, thus preventing her from learning the final spell. She convinces Paul to use the enchanted bed to return the group to London, and locate Professor Emelius Browne.
Browne turns out to be a charismatic showman who created the course from an old book, and is shocked to learn the spells actually work. He gives the book to Miss Price, who is distraught to discover the final spell, “Substitutiary Locomotion”, is missing. The group travels to Portobello Road to locate the rest of the book. After an exchange with an old bookseller, Miss Price learns that the spell is engraved on the Star of Astaroth, a medallion that belonged to a sorcerer of that name. The bookseller explains that the medallion was taken by a pack of wild animals, given anthropomorphism by Astaroth, to a remote island called Naboombu. A 17th century lascar had claimed to have seen Naboombu, but the bookseller never found it. Paul confirms its existence by revealing a storybook he found in Mr. Browne’s playroom.
The group travels to Naboombu and land in a lagoon; there, the bed goes underwater, where Mr. Browne and Miss Price enter a dance contest and win first prize. Just then, the bed is fished out of the sea by a bear, who informs the group that no human is allowed on the island by royal decree. They are brought before the island’s ruler King Leonidas, who is wearing the Star of Astaroth. Leonidas invites Mr. Browne to act as a referee in a football match. The chaotic match ends in Leonidas’ self-proclaimed victory, but Mr. Browne swaps the medallion with his referee whistle as he leaves, and the group escapes.
Back home, Miss Price exercises the spell, which imbues inanimate objects with life. When Miss Price is informed that the children can be moved to another home, she decides to let them stay, realizing she has come to love them and vice versa. The children declare they want Mr. Browne to be their father, but Mr. Browne, wary of commitment, bids goodbye to the group and attempts to take a train back to London. A platoon of Nazi German commandos land on the coast and invade Miss Price’s house, imprisoning her and the children in the local museum. Meanwhile at the train station, Mr. Browne encounters Nazis cutting phone lines and when he tries to escape, he punches them on to the train tracks.
Mr. Browne then tries to go back to Miss Price’s house to warn her and the children that they’re in danger, but found that they weren’t home, so he uses the white rabbit spell that he taught Miss Price so he can disguise himself to get away from the Nazis and finds Miss Price and the children at the museum and inspiring Miss Price to use the spell to enchant the museum’s exhibits into an army. The army of knights’ armor and military uniforms chase the Nazis away, but as the Nazis retreat, they destroy Miss Price’s workshop, ending her career as a witch. Though disappointed her career is over, she is happy she played a small part in the war effort.
Shortly afterwards, Miss Price has officially adopted and committed herself to raising the children, Mr. Browne also made a commitment to becoming the father of children and moved in with them. Mr. Browne enlists in the army and departs with the local Home Guard escorting him, promising the children he will return soon. Paul reveals he still has the enchanted bedknob, hinting they can continue on with their adventures.