Inside some caverns Bart realizes to his horror that Marge and Lisa tricked him into going on a nature walk. Lisa distracts her brother by putting a nickel inside a water bottle. Bart shakes the bottle excitedly. A short time later Homer inadvertently causes a stalactite to plummet into the cavern floor, sending the family crumbling into a hole. Homer gets stuck in the hole, and is unable to extricate himself. Lisa consults a map, and soon realizes that the chamber they’re in is uncharted. She fears the family will be trapped forever. As Marge and Bart scout for an exit, Lisa decides to tell Homer a story. The story begins a week earlier, as Lisa was walking home from school. While walking through a field, Lisa encountered a bighorn sheep. The sheep chased Lisa, who ended up taking refuge in Mr. Burns’ mansion. The sheep pursued Lisa and Burns through the estate, and they eventually barricaded themselves inside the attic. There Lisa discovered an Employee of the Month plaque from Moe’s tavern. It featured a photo of Mr. Burns. Mr. Burns decided to tell Lisa the story of how the plaque came to be. The story begins inside the Excluders’ Club, a very exclusive club where Mr. Burns hangs out. One day a Rich Texan entered the club and poured some crude oil over Mr. Burns. Furious, Burns challenged the Rich Texan to a duel, but he changed his mind, and settled on a scavenger hunt. Though Burns did well collecting most of the things on the list, the final item — having a picture taken with a smiling child — proved a particular challenge for the scary-looking Burns. The Rich Texan, however, didn’t have the same problem. He ended up winning the scavenger hunt, and all of Mr. Burns’ wealth. Penniless, Mr. Burns decided to start at the bottom and work his way up. He took a job at Moe’s tavern. While cleaning the bar, he happened upon an envelope. It read, “To be opened upon my death—Moe.” Burns opened the envelope, which contained a story about Moe’s treasure.

Marge and Bart return to the cave chamber, where Homer is still stuck. They can’t find a way out. Lisa decides to continue telling her story, along with the stories of Mr. Burns’ financial decline and Moe’s treasure. The story of Moe’s treasure begins when Moe was hit by a bus. Mrs. Krabappel came to his aid, and Moe was instantly smitten. Moe told Mrs. Krabappel that he worked as a therapist for alcoholics. To cover up his lie, Moe disassociated himself from the barflies. Moe and Krabappel’s relationship soon blossomed. While having dinner in an upscale restaurant, the couple encountered Homer and his barfly friends. Moe told Krabappel that Homer and the others were his patients. Convinced that Krabappel would drop him if she found out his true profession, Moe decided there was only one thing left to do: move out of town and begin a new life. He didn’t have the money to make it happen. Then one day Jailbird walked into the bar with a bag full of gold coins. Jailbird, who was more of an Indiana Jones-type archeologist and hadn’t yet resorted to a life of crime, wanted to donate the coins to a museum. Moe robbed Jailbird of the coins, and then told Krabappel they were moving out of town. Krabappel decided she wanted to stay in Springfield and teach. Heartbroken, Moe returned to the bar, where he fed the gold coins into the jukebox machine. The scene shifts to Moe’s bar, where Burns finishes reading Moe’s letter. Using an ice pick, he pried open the jukebox machine and made off with the coins. He then approached the Rich Texan, who agreed to give Burns back all his worldly possessions… except for the nuclear power plant. He said he’d only return the plant if Burns had his picture taken with a smiling child. Realizing he’d never get the plant back, Burns grew despondent. The scene shifts to the attic in Mr. Burns’ mansion, where Burns and Lisa are still holed up. Suddenly the sheep burst into the room. Lisa realized the sheep was simply trying to return a necklace to her. Lisa thanked Mr. Burns for risking his life to save her. She grabbed a Polaroid camera, and took their picture. This allowed Burns to reclaim his power plant. The story shifts back to the cave, where Homer admits he led the family into the cave so he could retrieve the gold coins.

Homer recounts how he found out about the gold coins, which are hidden in the cave. Suddenly the Rich Texan appears, gun in hand. Marge assures the Texan she can’t return the gold to him, because the family has yet to locate it. The Rich Texan tells Marge where the bag is, and demands that it be handed over to him. Suddenly Mr. Burns appears. He demands that the gold be given to him. Moments later Moe appears, baseball bat in hand. Soon after Jailbird and his son Jeremy also appear. Marge yanks the bag of gold away from the Rich Texan, and threatens to drop it over a chasm. When no one will agree to divvy up the gold, Marge makes good on her threat. The scene shifts to Principal Skinner’s office, where Bart is finishing the tale. Bart claims it’s the reason why he didn’t have time to study for the geography test.