After receiving multiple death threats in the mail, Bart becomes paranoid. It is revealed that the writer is his enemy, Sideshow Bob, who is incarcerated in Springfield State Prison. The next day, Sideshow Bob's parole hearing is held; the parole board is easily convinced that Sideshow Bob is no longer a threat, reasoning that "No one who speaks German could be an evil man" after seeing Bob's "Die Bart Die" tattoo. When the Simpson family goes to watch an Ernest movie at the theater (called "Ernest Goes Somewhere Cheap"), Sideshow Bob sits in front of them and acts obnoxiously, smoking incessantly and laughing, much to the Simpsons' annoyance. The Simpsons then realize that it was he who sent the letters, and Marge angrily tells him to stay away from Bart.
Despite their efforts, Chief Wiggum and the Simpson family are unable to protect Bart from Sideshow Bob. Sideshow Bob drives around Evergreen Terrace in an ice-cream truck, calling out the names of all the people whom he will not kill; Bart's name is not on that list. The Simpsons opt for the Witness Relocation Program and move to Terror Lake, changing their surname to "Thompson" and settling in a houseboat. However, unknown to the family as they drive cross-country to their new home, Sideshow Bob has strapped himself to the underside of the car. Bob has a very uncomfortable journey, as the car goes over speedbumps, Homer inadvertently throws his coffee onto Bob and the car drives through a Cacti field.
As the Simpsons arrive at Terror Lake and go inside their new houseboat, Sideshow Bob comes out from under the car. In doing so, he steps on the teeth of a number of rakes repeatedly, causing the rakes' handles to swing up and hit him in the face. Later, when Bart is walking down the road, he sees Sideshow Bob escape from the underside of another car, only to be trampled by a parade of elephants, greatly adding to his misfortune. Bart runs home and warns his parents about Sideshow Bob's presence. Bart goes to bed, but he is very apprehensive and on edge.
During the night, Sideshow Bob reaches the houseboat and cuts it loose from the dock with his machete. Bob then ties up Homer, Marge, Lisa and Maggie, so that they will not interfere with his plan. After tying up Santa's Little Helper and Snowball II as well, Bob enters Bart's room, ready to kill him. Bart escapes out the window and tries to escape, but he cannot jump off the boat, as there are crocodiles and electric eels in the water; he is cornered. As a "last request", he has an idea: he compliments Sideshow Bob on his beautiful voice and asks him to sing the entire score of the H.M.S. Pinafore, to stall for time as the houseboat floats to Springfield. After the performance, Bob advances on Bart again, but the boat runs aground, and Sideshow Bob is apprehended by the police. He is taken away, and the Simpsons return home. Abe Simpson, however, was not aware that they had moved and, without his pills, he ends up becoming a woman and being asked out by Jasper.