In a sunlit, magical garden, Dougal the dog wakes to a rude jolt from his cuckoo clock and recalls a puzzling event from the night before. He sets off on a train to speak with Zebedee, trading a few quick exchanges with Ermintrude, Brian, Dylan, and Mr. MacHenry along the way. As he recounts the memory, he reveals that after a startling awakening he heard two voices emanating from the long-quiet treacle factory. The second voice—a female—keeps repeating, “Blue is beautiful, blue is best. I’m blue, I’m beautiful, I’m best!” This chilling clue nudges Zebedee to suggest Dougal seek out Florence for help.
At the roundabout, Florence is greeted by Mr. Rusty and the other kids, who unveil a surprising guest: a sly blue cat named Buxton Paul Bisciglia. When Zebedee arrives and shares Dougal’s dilemma, Florence leads Dougal to meet Buxton. A twinge of jealousy flares in Dougal as he notices the warm attention Buxton receives, and he grows wary that the blue cat’s arrival could be tied to the strange night-time event. The fear proves warranted: Buxton harbors a plan to seize control of the garden.
Later, Buxton slips away to the treacle factory and makes contact with the Blue Voice, a.k.a. Madam Blue Christine Lefèvre, who dreams of turning everything blue and wiping out those who aren’t. Buxton is crowned king after he correctly identifies the seven doors colored in shades of blue, cementing his hold on the factory’s power. Back in the garden, Dougal resurfaces, having been saved or trapped on an elevated platform, and he tries to warn the others of Buxton’s true nature. The blue threat begins to show its signs as blue cacti sprout around the garden. A distressed Zebedee arrives with his moustache mysteriously missing, foreshadowing the upcoming trouble. The group searches for the magic moustache while Buxton quietly consolidates his control, locking down the escape routes and keeping everyone in the factory’s shadowy orbit.
Beset by fear and suspicion, Dougal concocts a bold plan after a scarecrow hints at a way to reveal the truth: he dyes himself blue to pass as part of Buxton’s world. Arriving at the factory through a trapdoor, he introduces himself to Buxton as Blue Peter and declares his strong hatred for sugar. Buxton, ever the captive of appearances, locks Dougal in a sugar-filled torture chamber to force a confession. Dougal faces a stark choice: swallow the sugar and reveal his identity, or resist and risk losing Buxton’s trust. He chooses resistance, earning his release and the title of Prime Minister.
Dougal then tours the caves beneath the treacle factory, tracking down his friends in the dungeon, only to be followed by Buxton. Madam Blue orders a bold conquest of the Moon and even paints it blue, as the French version reveals. On the Moon, Dougal slips and his blue dye washes away, exposing his true self. The confrontation with Buxton escalates into a struggle, but Dougal manages to reach Earth with a parachute, while Buxton’s rocket crashes back into the factory. Madam Blue’s fury erupts in a lightning storm, stripping Buxton of his crown, while Dougal frees the other captives from the dungeon. In the ensuing escape, Brian realizes something has been forgotten, and Buxton’s hold over the magic is tested as the factory trembles.
The crew returns to the magic garden, where Buxton’s remorse begins to surface. Dougal reveals what happened to Brian, prompting a shared mourning for their friend. In a poignant moment, Buxton blushes and his true color—white—emerges as Brian reappears alive, bringing Zebedee’s moustache back. With a wave of magic from Mr. MacHenry, the skies brighten into a snowy flourish, and Mr. Rusty guides everyone on a ride aboard the magical roundabout, sealing the day with a soft, celebratory close.