As the boys track a missing artifact across Duckburg, Scrooge and Webby stall the warrior looking for it with a phony quest.
A masked figure can be seen riding a motorcycle within the desert, and soon after comes across the ocean with a ship leaving for Duckburg. He then rides down onto the docks using his motorcycle, and jumps over to the departing ship while jamming two knives onto it in order to climb aboard. Day turns to night as the masked figure lies hiding on the ship through most of the trip, and makes his way stealthily throughout the city of Duckburg towards McDuck Manor. While Huey is brushing his teeth for bed, the masked figure sneaks into His room, as Huey notices the man standing behind him and realizes he had snuck in through the window. Huey then calls for his uncle Scrooge, claiming that someone had come to see him.
Huey, along with Dewey and Webby are then sitting in the living room with the man who calls himself Djinn, as they occupy him while Scrooge looks in the garage for what he requested. When asked about the artifact, Djinn explains that he seeks the lamp of the first genie, a sacred relic of untold value that Djinn's family has sworn to guard their entire life. He also threatens if it is not given to him this very day, the consequences would be dire. Meanwhile, Scrooge, Louie and Mrs. Beakley continue to search through the garage for the lamp, but still remain unsuccessful. Bentina blames Scrooge for not having locked it away for safekeeping, knowing that anyone could've gotten their hands on it, but Scrooge shrugs it off as he originally assumed it to be a cheap knockoff. As Louie is searching through a bin of lamps, he accidentally opens up a lamp known as the Ferryman's flame. Scrooge closes in the nick of time, but warns Louie of the lamp lighting a way to the land of the dead.
Louie then asks more about the description of the lamp in order to avoid any more mix-ups with other supernatural artifacts, but then comes to realize he had accidentally sold it while holding a yard sale recently. Knowing the lamp was no longer in the Mansion, Scrooge attempts to minimize the blame on his perspective to Djinn by explaining he had simply misplaced it, but instead it causes Djinn to begin tearing everything apart with his sword. In an attempt to throw him off, Louie explains to Djinn that the lamp was actually stolen, with Scrooge deciding to go along with the charade. They lie and state that the lamp had actually been stolen by a Greek god, and may currently be on Ithaquack, but Djinn isn't willing to follow along with the claim unless Scrooge comes along the trip. As Scrooge, Webby and Djinn are preparing to leave on the Sunchaser, Scrooge explains the situation to the triplets, and gives them the responsibility of finding the lamp while he keeps Djinn distracted on Ithaquack so he doesn't destroy anything else in the Mansion.
Louie then begins explaining his perspective of the events of the yard sale to his brothers, and claims that he had already gotten bored within the first twenty minutes, so he decided to ask Duckworth's ghost to carry on with the yard sale duties in his place. Knowing they hadn't seen Duckworth for at least a week, Louie knew the most likely way to find him would be by using the Ferryman's flame. Meanwhile on Ithaquack, Scrooge, Webby and Djinn enter the Greek temple and attempt to further distract him by luring him deeper in. As they enter a room, Charybdis comes out from the water in an attempt to scare Djinn with the words Webby tells him to speak through sign language, as he and the moon goddess Selene also agree to assist in the charade. But much to Charybdis's surprise, Djinn begins fighting him off much harder than he anticipated.
Back at the mansion, the triplets open the Ferryman's flame, but are originally greeted by another undead monster named Francis, until Duckworth shows up and claims the triplets are with him. Francis then returns back through the flame, but because of the triplets interrupting Duckworth's long overdue vacation, he turns into his Demonworth form and demands answers. They then ask him who he sold the lamp to, with Duckworth stating that a man decided to buy the lamp, claiming it would go well with his new Persian rug, but didn't have any money until suddenly a twenty-dollar had flown straight into his wallet. Knowing how lucky the man was for that to have happened, they decide to go to their cousin Gladstone Gander for more answers.
Back on Ithaquack, the fight between Charybdis and Djinn resumes, but eventually, Charybdis has no choice but to admit defeat. Knowing they still need more time for stalling, Webby decides they make their way to a room known as Appendix B. Back in Duckburg, the triplets arrive at Gladstone's new residence and ask him for information on the lamp. However, Gladstone claims he isn't sure either, as he recalls he was walking back from the mansion when he came across someone who offered to pay the lamp with sticky nickels. He originally rejected the offer, so instead, he accepted trading it with a blimp, which then became Gladstone's new home known as the Gladyear Blimp. When they ask what person would make a trade like that, Gladstone believes it to be some rich kid who had come out of a giant treehouse, worryingly making the triplets realize that Doofus Drake had taken the lamp.
Back on Ithaquack, Webby explains to Djinn that a trial known as the impossible riddle of the minotaur is the way to find the lamp, and can only be answered by the purest of hearts. When Djinn enters the chamber, he comes across the minotaur standing atop a miniature sized display of the islands, when in actuality it's Selene and Scrooge in disguise. Scrooge in a deeper voice then explains the riddle:
I'm more powerful than the gods, more evil than the demons. The poor have me, the rich need me. If you eat me, you shall die. What am I?
Scrooge initially thinks it will take a fair amount of time for Djinn to answer, only for Djinn to give the correct answer to Scrooge a few seconds later which was nothing. Knowing he is beaten, Scrooge is forced to come up with further stalling questions. However, all of the riddles Scrooge is given by Selene with her joke book are still solved by Djinn sooner than they imagine, and now have no choice but to let him proceed through the chamber with the wall slowly opening. Back in Duckburg, Louie initially has conflicted feelings about proceeding with the search for the lamp, and suggests they just find Djinn a replacement lamp. Huey backfires by saying that Djinn not only monologued about the importance of the lamp, but he wouldn't even blink while he was with them, leading them to realize how serious he's taking the situation. Even so, Louie resists with all his might on going back to Doofus Drake's mansion, and is ultimately carried by Huey and Dewey due to the previous experience he had when he last went.
The triplets then witness Doofus using an instrument known as a theramin, while assumingly forcing his parents to dance along with the tune. Once the song is over, the triplets ask Doofus if he knows anything about the lamp as he was roller skating, but Doofus remembers it as one of his syrup boats. He claims he needed it for one of his special pancake breakfasts, but once it ran out he threw it in the trash and instead decided to use his father's hands as a syrup holder from that point on. Knowing that the lamp had to have been recently thrown away, they decide to make their way over to the city junkyard. The triplets then phone Scrooge about the current whereabouts of the lamp, with Scrooge creating a plan for what he wants Selene to tell Djinn once he enters the final room.
As the wall had finally opened completely, Selene rushes back to her podium through a secret entrance with Djinn demanding the lamp from her. Selene instead congratulates Djinn on completing the riddles, but informs him (through Scrooge's words) that a nefarious person known as Ma Beagle had stolen the lamp and returned to Duckburg with it. That night, both Scrooge's group and the triplets reunite with one another at the junkyard, with Scrooge believing it would be best to search the area without alerting any of the Beagle Boys, who had been using the junkyard as a home. Nevertheless, Djinn calls out to all the Beagle Boys within the junkyard and demands the whereabouts of the lamp.
Eventually, Ma Beagle comes out of her shack demanding to know what all the commotion was about. When Djinn accuses her of stealing the lamp of the First Genie, this motivates Ma to try and find the lamp herself with the hope of being granted three wishes. But after realizing Ma Beagle doesn't have it and that the lamp was thrown away, Djinn demands to know what the entire quest he had been on all day was for, only to realize himself that Scrooge had cast it away and everything up until then was a charade. Nevertheless, the group fights together against the Beagle Boys while searching around the junkyard for the lamp. Eventually, Huey discovers the lamp on top of a tower made of tires. This then leads to a race between Scrooge and Ma Beagle, but after a minor scuffle for the lamp, Ma is able to throw Scrooge off the tire tower and retrieve the lamp. But to Ma's surprise, as she is wiping the side of the lamp hoping for a genie to come out, nothing did.
Djinn then laughs at Ma after realizing she thought there would be an actual living genie within the lamp. After Scrooge and the kids realize that all the trouble they went through was for something that wasn't even the slightest bit powerful or dangerous, they demand to know what it was all for. Djinn claims he wanted the lamp as it had not only been a family heirloom for centuries, but he also wanted it as a gift for himself as it is also his birthday. He then explains the story of the lamp, with one of his ancestors having discovered the lamp at a bazaar she was visiting. Once she rubbed it, a genie did appear in front of her, but instead of asking for wishes, she befriended the genie instead which eventually lead them to fall in love with one another. When the time finally came of her needing to make a wish, she decided to wish for the genie's freedom so they could remain together as a husband and wife. Soon after and just as Ma Beagle was about to destroy the lamp, Djinn shoots an arrow through the handle of the lamp with a string attached to it and snatches it out of her hand, while warning the other Beagle Boys to back off.
The next day, everyone is present in the dining hall at McDuck Manor to celebrate Djinn's birthday, as Beakley had baked a cake for the party. When asked by Scrooge what he plans to do now, Djinn replies he will find a new quest and hopefully let the lamp act as a whole new legend to share with his future descendants. This encourages Scrooge to take the kids on a trip to the museum with some of his artifacts discovered over the years. The scene ends as Scrooge is explaining to the kids about one of his prized artifacts known as the candy-striped ruby.