After a series of distractions from Marge, Homer suddenly smells out the annual chili cook-off. Marge admits that she was trying to keep Homer from attending because of his drunken antics at the previous year's event, when he jumped into a cotton candy machine, claiming he was a "puffy pink cloud", so she allows Homer to go, on the condition that he does not drink any beer. At the cook-off, Homer demonstrates an extraordinary ability to withstand hot foods, until he fails against Chief Wiggum's chili which burns the tip of his tongue. Sobbing about his humiliation, he drinks several cups of water.
After nearly accidentally drinking melted candle wax, Homer decides to coat his mouth with melted wax, which enables him to eat several of the peppers, leaving Wiggum and the crowd astonished. The peppers bring on a hallucination in which Homer is trapped in a bizarre fantasy world. He encounters a snake, a butterfly and a tortoise, and he accidentally destroys the sun. He finally arrives at a large Mayan pyramid and meets his spirit guide in the form of a coyote. The coyote advises Homer to find his soulmate, and questions Homer's assumption that he has already found her in Marge. Meanwhile, Marge hears of Homer's strange behavior and, believing he has broken his promise, drives home.
The next day, Homer regains his senses while lying in a golf course sand trap. He rationalizes his dream, comparing the desert he wandered in to the sand trap, the Mayan pyramid with a pro shop, and the talking coyote with a passing talking dog. After returning home, he finds Marge angry with him for his embarrassing behavior at the cook-off. This leads to Homer making note of their fundamental personality differences, causing him to question if Marge is truly his soulmate, and he leaves. Filled with doubt, he searches elsewhere for a soulmate, yet fails in each instance.
Eventually he becomes convinced that a lighthouse keeper might be his soulmate, since they would both be theoretically lonely individuals; instead he finds the lighthouse is operated by a machine, EARL (Electronic Automatic Robotic Lighthouse). Seeing an approaching ship, Homer destroys the lighthouse's light in hopes that it will cause the boat to come closer and the people inside will befriend him. An apologetic Marge arrives, having known exactly where Homer would go, and the pair realize that they really are soulmates. Marge quickly fixes the lighthouse so that the ship will not run into them, but it runs aground nearby, spilling its precious cargo of hot pants. The citizens of Springfield happily retrieve the pants while Marge and Homer embrace.