Bart introduces each of the three segments by walking through a gallery of paintings and each time choosing one of them as the focus of his story.
In a parody of The Devil and Daniel Webster, at work, Homer states that he would sell his soul for a doughnut after finding that Lenny and Carl took all the doughnuts and threw them at an old man (Abe Simpson) "for kicks". The Devil, revealed to be Ned Flanders, appears and offers Homer a contract to seal the deal. However, before Homer finishes the doughnut, he realizes that Ned will not be able to have his soul if he does not eat all of the doughnut and keeps the final piece in the refrigerator. Unfortunately, while half-asleep and looking for a midnight snack, he eats the final piece of the "forbidden donut", and Ned instantly reappears to take possession of Homer's soul. Marge and Lisa plead with Ned, finally getting him to agree to hold a trial the next day. Until then, Homer is sent to spend the rest of the day being punished in Hell (though his ironic punishment of being forced to eat all the doughnuts in the world doesn't work, as Homer consumes them all with little effort). At the stroke of twelve midnight, Ned brings Homer back to the Simpson household for his trial, imprisoned in a cage of fire. Marge has hired Lionel Hutz to represent Homer, but he immediately makes things worse when he agrees to let Ned choose the jury, which consists of Blackbeard, John Dillinger, Lizzie Borden, Benedict Arnold, Richard Nixon (who protests that he isn't dead yet), and the 1976 starting line of the Philadelphia Flyers, and the Grim Reaper presides over the trial. The case goes poorly, as Lionel Hutz accidentally ruins his argument, and then flees through the bathroom window. Moments before Homer is sentenced to damnation, Marge makes a final effort to save Homer by displaying a photo from their wedding day, taken in an emergency room after Homer ate a whole wedding cake by himself. On the back of the photo, Homer has written that, in return for Marge giving him her hand in marriage, he pledges his soul to her forever; therefore, it was not his property to sell at the time of his deal with Ned. The jury rules in favor of the Simpsons and the presiding judge (Death himself) dismisses the case, sending the damned souls back to the afterlife. Enraged, Ned leaves, but curses Homer with an eternal reminder of his ill-gotten donut - by transforming Homers head into a huge donut. This leads to Homer being besieged by the police of Springfield who wish to eat him.
In a parody of Nightmare at 20,000 Feet, a short story by Richard Matheson (and later a classic Twilight Zone episode of the same name starring William Shatner), Bart awakens from a nightmare where he is killed in a horrible bus crash. While Marge is sympathetic, Homer makes Bart even more on edge due to playing around with a fog horn he stole from a boat in the marina. Outside, the morning is grey and rainy, mirroring the weather of Barts dream, as he and Lisa boards the school bus, where they find Principal Skinner, who has been forced to take the bus to work rather than his car after his mother hid his car keys as punishment for talking to a woman on the phone. Still disturbed by his nightmare, Bart glances outside, and notices a gremlin clinging to the side of the bus, and loosening the lugnuts on one of its wheels. Frightened, Bart tries to alert Otto, but Otto misunderstands him and instead sees Hans Moleman driving an AMC Gremlin next to the bus, which Otto promptly shoves off the road. After being admonished by Skinner, Bart once again looks outside, only to be frightened by Groundskeeper Willie, who has been stranded by the side of the road after killing his mule for refusing to walk in the rain. Finally, after Bart makes the whole bus panic, Skinner and Willie strap him to the seat, but Bart manages to convince foreign exchange student Uther to free him. . In desperation, Bart climbs halfway out the window to scare off the gremlin with an emergency flare. The gremlin catches fire and falls from the bus, but is found by Ned Flanders, who decides to adopt the creature. When the bus finally stops, everyone sees the obvious damage, but Bart is still sent away to an insane asylum for the rest of his life for his disruptive behavior. Bart is relieved as he is finally able to rest, but the gremlin appears in the back window of the ambulance, holding Flanders' decapitated (yet still living) head, which makes Bart scream in terror.
In a parody of Bram Stoker's Dracula, the Simpsons are watching the news one night, when a story about several farmers being found drained of blood outside Springfield airs, which Lisa immediately suspects to be the work of a vampire, though the Springfield police, while correctly guessing that the perpetrator is a supernatural predator, thinks it is the work of a mummy and have had the Springfield Museum's Egyptian wing destroyed. Another report shows that Mr Burns has purchased the Springfield Blood Bank, and is shown on camera licking blood off his hand. Lisa believes him to be the vampire, but Homer dismisses her concerns. Soon after, the family is invited to Burns' castle in Pennsylvania, where they are greeted by a ghoulish Mr Burns, who serves them blood for dinner, which Homer happily consumes because its free. Lisa excuses herself and Bart from the table, and go looking for Burn's hidden lair, at first stumbling across a hidden room leading to a laundry, but soon find a large gateway, where Bart and Lisa discover a secret staircase descending to an eerie basement filled with coffins. There, Lisa finds a large tome titled "Yes, I Am A Vampire, by Mr Burns", but unknown to her, vampires emerge from the coffins and encircle them, while a terrified Bart tries to warn her. Lisa escapes, but Bart activates the "Super Fun Happy Slide", causing him to be captured and get bitten by Burns. Bart returns to the table with Burns, who tells him to take a seat. Bart is very pale and is behaving oddly, but these factors get little attention by the family. Later that night, Lisa is awakened by a now undead Bart, alongside Milhouse and several other Springfield children that he has turned. When Bart is about to bite Lisa, Homer and Marge interrupt and discover that Bart is a vampire. Lisa claims that the only way to restore him is to kill the head vampire, Mr. Burns. The family returns to the Burns' mansion, where Homer (after accidentally hitting the crotch) drives a stake through Burns' heart, though Burns does momentarily come back to life to fire him. Unfortunately, despite Burns' death, Bart still remains a vampire. To make things worse, Lisa discovers that everyone in the Simpson family except for herself is a vampire, and that the true head vampire is inexplicably Marge, not Mr. Burns. With this revelation, the whole entire family swoops in on Lisa, only to stop and wish everyone a happy Halloween. Then, they all harmonize "Hark the Herald Angels Sing", parodying A Charlie Brown Christmas.