Scrooge McDuck, Alan Young, travels to the Middle East with his nephews Huey, Dewey, and Louie, and Webby Vanderquack, Russi Taylor, along with Launchpad McQuack, Terence McGovern, to inspect a recently discovered treasure chest he believes holds the legendary treasure of the great thief Collie Baba. The group starts hopeful, hoping to turn legends into a tangible fortune, but the chest initially seems to contain only old clothes, until a hidden pocket reveals an ancient treasure map that lights Scrooge’s imagination and raises the stakes for everyone involved.
Guided by the shifty thief Dijon, Richard Libertini, the adventurers set off on a desert-crossing quest to locate the fabled hoard. Unbeknownst to them, Dijon is secretly working for the evil sorcerer Merlock, Christopher Lloyd, who yearns for something that Collie Baba once possessed. The pursuit leads them to a sun-scorched pyramid where Collie Baba’s treasure lies buried beneath shifting sands. Inside the treasure chamber, Webby spots a lamp glinting among the riches, and Scrooge, ever the sensible one, lets her keep it since it doesn’t appear to hold much value at first glance.
But the moment they pack up and prepare to leave, a trap closes around them: Merlock and Dijon unleash a room full of monstrous scorpions and snatch the treasure away. Merlock quickly realizes the lamp is missing and drags Dijon along in his search, driven by a centuries-long hunger to reclaim what he believes is rightfully his. The group manages a narrow escape from the pyramid and, with nothing left but Webby’s lamp, they journey home to Duckburg to regroup.
Days later, the lamp reveals its astonishing secret: a Genie, eager for freedom and mischief alike. The Genie grants the four children three wishes apiece, but he does so with a misdirection that plays to their naive curiosity, even disguising himself as the boys’ Woodchuck scout friend Gene. The wishes run wild and ridiculous, producing a baby elephant that runs amok through Scrooge’s mansion and a colossal ice cream sundae, among other chaotic outcomes. The Genie then warns them about Merlock, who has used wishes to seek eternal life and to destroy places like Atlantis and Pompeii—vacation spots Merlock deemed convenient to conquer. Merlock’s talisman, a magical artifact that lets him shift forms and stack wishes, seems to override the lamp’s rules, giving him unstoppable power. The tale recalls that Collie Baba once stole the lamp from Merlock and hid it away with his treasure, and Merlock has spent centuries tracking it down. The kids wonder if they should wish for the talisman itself, but Genie declares that such a wish is beyond his power; preventing Merlock from obtaining the lamp becomes their sole urgent mission.
In a playful, bittersweet turn, Webby uses her last wish to bring all her toys to life, which forces the children to reveal Genie's true identity to Scrooge. Aims now set on glory, Scrooge wishes to showcase Collie Baba’s treasure at a grand Archaeological Society ball, taking the lamp and Genie with him to the event. They’re followed by Merlock and Dijon, who ambush Scrooge. In the chaos, Scrooge mistakes a gravy boat for the lamp and ends up leaving the lamp and Genie in Dijon’s hands—who, swayed by Genie’s scheming, chooses to keep the lamp rather than hand it to Merlock.
Dijon seizes power, taking possession of the Money Bin and other properties, and Scrooge is arrested for trespassing. He is swiftly bailed out by Launchpad, his nephews, Webby, Mrs. Beakley, and Duckworth, who stand with him to set things right. The team infiltrates the Money Bin in a bid to reclaim the lamp, but Merlock reclaims it in the ensuing struggle. With Genie under Merlock’s control again, the sorcerer has Dijon transformed into a pig for his disloyalty, and he makes the Money Bin soar into the sky as a fortress. When Scrooge threatens Merlock, the sorcerer wishes him away from the fortress, flipping the balance of power and sending Scrooge to the edge of danger. The nephews intervene with a slingshot to knock the lamp from Merlock’s grasp, sending it tumbling to Scrooge, who loses his grip and plummets toward the earth. Merlock seizes the talisman and transforms into a griffin, grappling with Scrooge in the air, but Scrooge finally knocks the talisman from Merlock’s hand, returning him to normal just as he plummets to his doom.
Recovery of the lamp follows, and Scrooge uses his second wish to transport himself, his family, and their Money Bin back to Duckburg. Back home, Scrooge proclaims he has had “enough of all this wishing,” but Genie’s plea sways him to make one final, selfless choice: to grant Genie real life. With the lamp disintegrating into dust and the Genie becoming a real boy, the magical threat ends, and the children enjoy their new friendship. The world settles into a new rhythm, though Dijon remains at large, pockets of wealth in hand as Scrooge chases him through the streets of Duckburg, shouting a classic comic closer: “Somebody, stop those pants!”