In Mayan times, at Chichen Itza, some Mayans check their calendar, which says the world will end after 13th Baktun. To prevent this event, a human sacrifice is about to take place. Meanwhile, Glutton has been fattening up, preparing himself to be sacrificed. His wife tells him, that she will be lonely once he is sacrificed, but Glutton says, that he never said anything about sacrificing himself. When a Mayan priest enters, Glutton's wife reveals that she has a plan and asks the priest if he's interested in woman. The Priest replies: "What priest isn't?" and and is told by Glutton's wife to put a sack over his head and to go into the room of pleasure, which is actually the balcony, where Glutton would've been executed, instead the Priest gets executed and his head bounces onto the ground, where kids start kicking him as a ball. After the wrong person is sacrificed, one Mayan realises that the world really will end after 13th Baktun and asks the Mayan wiseacre to explain. It is revealed, that world will end in 2012 and few people say, that it will be Obama's fault. In the present, Homer asks Marge which Baktun it is and Marge answers: the 13th. He opens door for Q'uq'umatz and his two friends (J'wuu'pawwzer and Natt'putter), while one of them is crushing Homer, Q'uq'umatz crushes the Flanders house. Soon, they start to destroy the world, it blows up, and "TREEHOUSE OF HORROR XXIII" comes out of what is left of the world.
The Springfield citizens goes to Springfield Subatomic Supercollider to see the activation of Springfield Particle Accelerator, which was built instead of a new baseball stadium, due to lobbying of Lisa Simpson. Professor Frink activates the machine and it works, but nothing exciting happens, and everyone blames Lisa for her suggestion. After everyone leaves, the two particles collide with each other and create a small black hole which floats off. Lisa cries on the ground, then sees that her tears are floating and sees the black hole. Lisa realises that she must move the black hole, otherwise it will continue to suck other people, as it sucked up Ralph and Nelson. The Simpsons put it in the basement and Lisa tries to convince them not to throw any junk in black hole, otherwise it'll grow bigger and may destroy Earth. But Marge, Homer and Bart secretly throw junk at the black hole - Marge puts their grease (because it attracts raccoons) and Bart tries to put his math homework in, but the black hole doesn't accept it, so he puts Edna Krabappel in black hole. In next morning, black hole grows bigger and sucks up lots of the Simpson's stuff. Lisa asks the family if anyone threw anything in it and family denies. Then Lisa spots Snowball V is missing and Santa's Little Helper shrugs too. Other citizens of Springfield gather to put their trash to the black hole, because Homer opened his own business - Magic Craphole Waste Removal. And then the Simpsons house is sucked into the black hole too. And Springfield citizens throw their junk at the black hole - Comic Book Guy throws Disney's "Black Hole" in and Horatio McAllister attempts to put a big fish skeleton in. Lisa tells everyone, that if one more thing gets sucked into the hole, it could reach critical mass. Meanwhile, Milhouse is playing baseball and hits a home run. Suddenly, the ball gets sucked up into the black hole and it grows very big, sucking up Springfieldians, except Maggie. The black hole sucks up Maggie's pacifier and sucks it, going off into the distance. Meanwhile, everyone gets into the planet, where their junk is treated as 'treasures' and aliens built their society around it. The aliens' favorite magazine is the Presidents' Day mattress blowout sale insert and their favorite food is banana peels. The aliens say that they listen to music on the most wonderful device ever created - The Zune. Homer tries to say, that this is only old junk, rather than treasures, but Marge covers his mouth and tells to aliens to enjoy it.
Homer sets up a camera at 11:15 AM near the mirror filming himself, and says that strange things happens in house. He says, "that if anyone finds this footage, after we're missing or dead they should remember him as a hero". Maggie's toy have the word get out. Bart and Lisa suddenly come up, because Homer forgot something and Ned comes too and claims that the camera is his. At 10:22 PM, Homer sets up the camera in his and Marge's bedroom, and asks Marge if she wants to snuggle. Marge says that she won't snuggle with the camera on, but Homer convinces her that the camera is off. At around 3:08 AM, the bedroom door opens and the duvet is lifted off the bed and onto the floor. Also, the cupboard is lifted and a golf club is lifted up in the air, which hits Homer four times and is dropped on the ground. Around 4:42 AM, the two are woken up by a loud noise downstairs. They both come downstairs and Homer takes his camera, but falls down the stairs. Homer and Marge find the family room destroyed and Lisa wants to know why this is happening to them. Marge claims that she doesn't know anything and Homer tells Lisa that every night a mysterious invisible-being from hell waits for a family to go to sleep, then kills them. In the living room at 1:15 PM the next day, Raphael fits more cameras in Simpsons house, and ensures Homer that if anything strange happens, the cameras will pick up. At around 11:14 PM, Milhouse is asleep in Bart's room, and in Lisa's room two seconds later. In Homer and Marge's bedroom, Marge wakes up, walk around and watches Homer for 4 hours. Homer wakes up, says "hello" to Marge, hears her growling and tries to take her to have sex with him. At around 4:09 AM, Homer pees in the bathroom, but Marge comes, watching him for over 20 minutes. Both of them remain where they are for another ¾ of an hour. At about 2:07 PM, Chief Wiggum tests fire in the Simpsons' family room and says, that it's hell fire. He also says, that someone made a deal with the devil and the devil wants his due. But he gets scared of the cuckoo-clock, and after that he enters back in family room, now as a skeleton and says, that the devil feeds on more than fear, before collapsing. On Night 15, at 1:23 AM Maggie's blocks and door vibrates. Maggie levitates, is put into a baby carrier, and a bag is placed on the baby carrier, which a bottle has been put into. And then Marge comes to take Maggie back, but someone says that they had a deal. Homer and Lisa come into room, and Bart runs to room, throwing baby powder on "mysterious" creature, which is devil, resembling Moe. Marge cries and tells the family, that when she was a girl, she saw her sisters, Patty and Selma in the attic hailing Satan. They tell Marge that they're doing so because there is nothing good on TV, they have no boyfriends, and they are bored. It worked,but the Demon wants to take Selma and Patty. Marge asks the Demon to comeback for her sisters later, and the devil agrees. Marge had 30 years and after that, the Demon will take her favorite child. Lisa says, that she is supposed to be the favorite, but after Demon grabs her, she denies that she's the favorite. Homer asks the Demon, if there is another deal he can accept. The deal is a three-way, and Homer asks, if it's between the Demon, him and Marge, but Demon says, that it's between Homer, him, and another Demon. At around 3:30 AM, Homer asks the demons for the safety word, which is cinnamon. Homer wants that they should try something new, and throws his dressing gown at the camera, and the demon shouts "Cinnamon" repeatedly.
At Android's Dungeon & Baseball Card Shop, Bart complains about the price of Radioactive Man comic price to Comic Book Guy. Bart tells Comic Book Guy that it's not fair that he's charging $200 for a comic that says 25¢ on the cover. Comic Book Guy tells Bart that the only way to purchase the comic at the cover price is to go back in time to 1974. Bart says, that it's impossible, but when he looked at Fantastic Foreshadowingcomic (it was written: "The Boy Who Went Back to 1974"), he went on the street. And suddenly he saw Professor Frink with his invention: time machine. Frink asks Bart to hold his keys while he grabs some lunch, but Bart gets in the car and gets a chance to get into 1974. Bart then goes to
Android's Dungeons and Baseball Card Shop's grand opening and buys Radioactive Man comic, but throws it into recycle bin, as it is "too preachy" to him. He's just outside the boy's bathroom at Springfield High School, while Principal Dondelinger is telling off a young Homer Simpson and a young Barney Gumble for smoking. Bart gets shocked and gets into Springfield's High School. In the detention hall, Homer meets Bart, who explains to Homer that he's his unwanted son from the future who killed all his fun. The young Homer then strangles Bart. Then, young Marge Simpson enters the room and sits down, while young Homer is still strangling Bart. Young Marge gets disgusted by young Homer's behavior, and then young Homer asks her to go to prom with him.
Homer tells off Bart because it was love at first sight and he ruined it. Marge then says that it wasn't love at first sight, and Homer says "What do you know?" Marge says that she knows who she's in love with, and Homer says that she's looking at him. Marge calls Homer an idiot, and Homer returns the favour - shocking Marge. Homer tells Marge to not act like it's the first time someone said that to her - but that backfires, because it is the first time someone has said that to her. Bart wonders, what will happen with him in the future, after he distracted young Homer from young Marge. He grabs his myPhone to check his future. At first, his normal future picture disappears, making Bart think he won't exist anymore, but after that, a picture of him appears, standing near fancy house, which Bart claims 'a hell better life'. Then, he convinces young Marge to not marry young Homer, which she agrees. Bart gets back to present, and young Homer jumps in time machine's trunk. While young Homer is in present, he claims his life is ruined, but after that, he sees a poster for Ken and Harry's Cookie Dough Ice-Cream. Then, he sees a shop window, where Itchy and Scratchy is played on huge screen TV's, and gets shocked, when sees an ad for Thursday Night Football. He also comments that the globe is so warm and that he is in awe at the future. Chief Wiggum then passes the street, asleep on a Segway. Homer says that that's not so great. Bart then goes to his fancy house, where Marge is making smoothie for Artie Ziff. Bart gets shocked, that his mother is married to Artie Ziff, which makes Bart Bartie Ziff. Bart lifts his cap and instead of spiky hair, he has now curly hair. Bart yells "Oy, carumba!" and sees her sisters Lisa and Maggie having curly hair too. Artie greets Bartie and tells him to enjoy his luxurious life - and his own bully butler - Nelson Muntz. Bart tells Nelson to give himself a wedgie. Young Homer watches them from window. He says that he missed the jive turkeys in the '70s, but that turkey's a jivis. Then, present Homer tells off young Homer, because it was his peeping tree, and then realises, that the teenager on the other branch is actually young him. Homer asks why he is in the present. Young Homer says that he traveled through space and time to make Marge settle for him because she doesn't know better. Homer tells Young Homer that if they put their heads together they can think of a plan and young Homer spots present Homer's stomach and asks what happened - and asks if he was in a forest fire. Homer tells him no, and then the two continue watching the Ziffs. There, Bart is using a whip to make petals fall off a daisy - which is in Nelson the butler's mouth, saying "I love my life" and "I love it not", similar to "Love me - Love me not" game, while Artie watches. Artie tells Bartie that he's just like Indiana Jones, a role played by Richard Dreyfuss in their universe. The doorbell rings and at the door is Homer, who has come to take his life back. Artie says, that he knew this would happened, so, he mastered Brazilian jujitsu. Homer then invites United Federation of Homers Through History and Artie and Bartie roll their sleeves up and clench their fists. Five minutes later, they had beaten all the Homers and rolled them into a ball. Present Homer tells the guys to regroup - even though he's in a tree. Their plan is to come back with more Homers and start fresh in the morning. Then, Marge comes and is startled. She looks at all the Homers and the Opera Homer asks Marge what she is doing there. Marge says that she realizes that she married the wrong man, and comforts the 'poor, sweet, simple Homers'. She says that she was supposed to be with all of them. Caveman Homer then grunts while trying to speak normally, and Marge says that she meant him as well. The present Homer, still stuck in the tree, corrects Marge - Caveman Homer is Renaissance Homer. Marge tells Homer that she wished that twenty years ago, she should've chosen love. Marge and Homer kiss while the other Homers look on. In normal Simpsons house, all Homers are watching the TV, when Marge comes in and tells them to get this straight - none of them had time to take out the garbage. Opera Homer says that Egyptian Slave Homer should do it. The Egyptian Slave Homer grumbles, because it's always him and the other Homers laugh.