Jeremiah Severin Bartholomew Olsen, affectionately known as JB, serves as the mayor of the sunny town of Sunnytown. With his loyal companions, a cat named Mitcho and an elephant named Sebastian, he enjoys life until complications arise due to the plans of the town's vice mayor, Mr. Twig, who aspires to construct a town hall. During a seemingly innocuous game of Yahtzee, JB's thoughts drift to Twig's ambitious project, prompting him to leave in search of Twig, only to unexpectedly disappear.
In JB's absence, Twig seizes the opportunity to take charge of Sunnytown, erecting his town hall and amusingly casting a shadow over the once-bright town. While navigating their everyday life, Mitcho and Sebastian stumble upon a mysterious message tucked inside a bottle. This message uncovers the truth: JB has found himself on an enigmatic island. Along with the letter, they discover an unassuming seed, which they plant in their garden. That evening, Sebastian reveals a poignant family story about his grandfather, who once gazed upon this very island in his youth, only to watch it vanish, devoting his life to searching for it—albeit in vain.
The following morning, the seed has transformed into a colossal pear. Enter the brilliant Professor Glykose, who constructs a home within this wondrous pear. However, misfortune strikes when Twig unintentionally tips the pear into the water. Determined to rescue JB, Mitcho, Sebastian, and Glykose set sail on an adventure that leads them to a band of pirates.
With Mitcho cautioning the group about the island’s mysteries, they return to the pear and utilize a magnotube compass to pinpoint JB's location. Disturbingly, they learn of Twig's nefarious intention to utilize a tank against the town hall's entrance. Their journey introduces them to Ulysses Karlsen, who whisks them away to his ship's library, revealing a stone that once belonged to Sebastian's grandfather, believed to have originated from the mysterious island. Unfortunately, their escape plan falters when an incident with Glykose knocks out the ship’s power, complicating matters further.
Nevertheless, Mitcho and Sebastian manage to snatch the stone and depart with the pear, finally discovering JB's whereabouts. The reunion is heartfelt, and JB shares his own tale of how he inadvertently ended up on the island after falling into a dinghy while attempting to meet Twig. To their dismay, they find that their pear abode has suffered damage upon their arrival, and Sebastian's heart aches for Sunnytown.
As night falls, the group is led to an engine room beneath the island and realizes they possess the means to drive it back. Join forces with the pirates and Karlsen, the team sets forth to address the havoc in Sunnytown. In a proactive measure, Sebastian decides to alert Twig of JB's survival by sending a message through a bottle using the town’s air pipe system. When Twig reads the message, rage propels him to launch a tank assault against the island. In the chaos, a giant pear bursts through the town hall, rejuvenating the town with light once again.
In a dramatic twist, while Sebastian finds himself in peril and nearly drowns, Mitcho gallantly comes to his rescue. The duo triumphantly returns to town, where they are embraced by jubilant celebrations marking JB's safe return. Ultimately, the town hall's original form is lovingly replaced with a new, enchanting pear-shaped structure, symbolizing hope and the resilience of Sunnytown.