In the opening sequence, Marge is making the Simpson family's desserts (cupcakes with chocolate icing in the shape of a jack-o-lantern face), and starts talking to the audience, and says how Halloween was last week, but then various logos pop up on the screen for Fox shows, including the mini logos for American Idol, Fox Sports, Prison Break, Cops, House and 24. Marge ends up killing several miniature characters that pop up from the logos (so everyone can "watch the show they are watching?!) and bakes them into bread, which she serves to her family. When she cuts it, the other characters' body parts are shown to spell out the titles and opening credits, and Homer says, "Mmm...'developed by.'"
Marge tells Bart to get butane from the shed in the garden and as he does so, he finds Kodos there. Kodos (explicitly referred to as male in this episode) states his desire to return home and that he had come to Earth in peace, though he hints that he was really sent there to destroy mankind. Bart, however, is oblivious to this, and decides to help him return home. Lisa arrives and is happy with the alien in their home and decides to help Bart and Kodos obtain devices that he can use to contact his home planet, though this appears to be part of his diabolical plan. It does not take Homer long to realize that Bart and Lisa keeping an alien in the house, but he and Marge decide to let them help Kodos anyway after Kodos accuses them of not letting him stay because he's Jewish. When NASA agents arrive at the Simpsons home, the family distracts them while Bart sneaks Kodos out. However, when Kodos kills several agents along the way, Bart begins to think Kodos's intentions are not as friendly as he was led to believe. Finally, Kodos reveals that the devices he had the Simpsons collect were for a portal-generating device so that others of his planet can come to Earth and wipe out the human race. When the aliens invade, a brief war is waged, though this time Earth has the upper hand. When Bart is given the option to board a helicopter and shoot Kodos, Bart inexplicably decides to spare his life, though Homer shoots him instead. In the end, Earth emerges victorious and the world is saved. The Simpsons are invited to see Kodos's dissection, where they reflect that since Kodos was an evil-looking alien who turned out to be bad, it must be good to judge a book by its cover. Kodos then points out that since he is still alive, it is called vivisection. He is then smothered by Homer with a pillow.
In a spoof of Mr. and Mrs. Smith, Homer and Marge appear to be attending marriage counseling and recount a brief moment of tension between them. In the flashback, when arriving home, Homer locks himself in the bathroom and communicates on a hidden flat screen television, where it is revealed Homer is an assassin assigned to eliminate news reporter, Kent Brockman, by order of Homer's boss, Mr. Burns. Before he leaves, he tells Marge he will be coming home late and makes up a crazy excuse; Marge also states that she is busy and makes up an equally farfetched excuse. When Homer prepares to shoot Brockman at his rooftop party from a faraway platform, a woman with large blond hair (who Homer dubs "the Mystery Skank") however, stabs Brockman in the chest, killing him instead. After Homer attempts to repeatedly shoot the woman (ending up with several civilian deaths), he manages to shoot the wig off her head, revealing Marge, also an assassin. Arriving home, the two avoid each other's eyes, and Marge makes an excuse for the blond wig. Not long after, the two attempt to kill one another with various weapons such as grenades, rifles, and a minigun, all the while arguing why the other was an assassin and end up killing Grampa. Bart and Lisa wake up but later leave. When they're gone Homer almost kills Marge with a crossbow when chief Wiggum enters the destroyed house. Wiggum complains about all the noise and that the neighbors are mad about all the noise, Marge becomes angry and shoots Chief Wiggum with the crossbow. Chief Wiggum answers sadly "I would have taken a bribe!" then falls to the floor. After wounding Chief Wiggum with a crossbow, the two realize they are more attracted to one another when they kill someone together. Thus, they soon begin having sex over Chief Wiggum. Returning to the episode's beginning, they both realise that they did not need any marriage counseling, but to kill people together. In the end, it turns out that they were not talking to a marriage counselor, but to Principal Skinner regarding Bart's misbehavior. Both Homer and Marge turn a blind eye to Bart's misbehavior and simultaneously shoot Skinner instead.
On Halloween night, Bart, Lisa, Milhouse and Nelson become frustrated by how some of the locals refuse to give them candy. Deciding to honor the true meaning of "trick-or-treat," they begin to pull pranks on everyone, although Lisa barely plays pranks. Soon, however, their pranks turn into vandalism and everyone begins to complain. Ned Flanders then offers his services to teach them a lesson and fashions the church into a "heck house." This attracts their attention and they decide to give it a try. Ned tries to simulate what could happen to them for their sins through the use of crude roleplaying, but they scoff at his attempts. Ned then turns to God to give him the power to scare them straight and subsequently transforms into the Devil, sending the kids to Hell. There, he brings up an enormous crystal ball revealing Springfield to be full of the Seven Deadly Sins, and shows them simulations of how they may suffer; the first clip shows Homer suffering through gluttony, where he transforms into pasta; the second shows Groundskeeper Willie beating up his tractor in wrath, only for his tractor to transform and cut his head off; the third has Doctor Hibbert with a bumper sticker that brags about his son in pride, where he becomes crushed in between his car and a van; the fourth has Homer suffering sloth, where he is chopped up by a hammock, despite the fact that he had been killed already "by that magic spaghetti"; lust, greed, and envy had Moe in lust for a stripper, greed for all her money, and envy "for the crotchless". The kids declare their lesson learned, and Ned returns them back to the surface, reverting to his original form. The episode ends with Ned telling the viewer that they will go to Hell for watching FOX and its affiliates. Plopper, Homer's pig from The Simpsons Movie, makes a cameo during the segment.
The episode averaged 11.7 million viewers and a 5.7 overnight Nielsen Rating and a 13 percent audience share, making it the highest rated episode of the season. Combined with a new episode of Family Guy, it tied for first in the 8:00 PM hour with the NFL Pregame show on NBC. Despite this, the FOX Network finished the night fourth overall in ratings.
Robert Canning of IGN called the opening segment, E.T. Go Home, "the weakest segment because it just wasn't really all that funny", and thought the end of the segment was the weakest part of the episode, writing "watching the military decimate the aliens and then seeing Homer use a pillow to put Kodos to sleep, this end was really off-putting. The deaths weren't funny, just uncomfortable." Canning, however, described the final two segments, as well as the opening as being solid segments. He gave the overall episode a rating of 7.4/10.