After Bart sabotages Principal Skinner's weather balloon by adding a Skinner-shaped flag that reads "Hi, I'm Big Butt Skinner" to it, Skinner decides to punish him by having him help with his amateur astronomy, which he engages in at 4 AM before school starts. Skinner dreams of finding something in the sky and having it named after him. When the weather balloon drifts by the playground, Skinner runs off to catch it, leaving Bart unattended with the telescope. Bart accidentally locates a comet which is named after him, much to the consternation of Skinner, who loses both his chance at having a celestial body named after him, and the grip on the weather balloon, causing it to fly off again. Scientists soon discover that the comet is heading straight for Springfield. Professor Frink plans to launch a missile at the comet, dispelling everyone's fears (save only by Lisa, who knows that this plan can backfire, and Moe, because in any circumstance, his tavern will be destroyed anyway). However, the missile flies past the comet, instead blowing up the only bridge out of town, dooming the people.
After a Congressional bill to evacuate Springfield is defeated due to a congressman attaching a bill to help fund "the perverted arts" to the evacuation bill, Homer decides that they should stay in the bomb shelter that Ned Flanders built. Anticipating this, Ned had built it large enough for both families. One hour before Springfield is destroyed, the rest of the townspeople arrive, demanding a place in the bunker. Homer is unable to close the door and someone has to leave. Homer decides that the only thing the "world of the future" will not need is left-handed stores and tells Ned to go. Ned tells Rodd Flanders to shoot him if he tries to come back in before leaves the bomb shelter, Moe decided that they should play a barnyard noise guessing game to pass the time; however, it causes a huge argument.
Eventually, Homer feels guilty and leaves as well, followed by the other townspeople and they all converge on a hill with Ned to await death. As the comet enters the atmosphere, it burns up in the thick layer of pollution over Springfield, popping Skinner's weather balloon and destroying Ned's bunker on the way. The town decides to burn down the observatory to prevent a similar incident from ever happening again. The Simpsons, however, are more worried at the fact Homer correctly predicted the fate of the comet---that it would burn up and fall to earth as a rock no bigger than a Chihuahua's head (it even lands next to an actual Chihuahua for comparison).