Homer and Marge take the kids to get their shots. Just before Dr. Hibbert is about to inject Bart, he escapes. After a chase through town, Hibbert finally outsmarts Bart, by having Barney wear a latex mask, and finally injects him. The shot, however, causes Bart's earholes to swell shut, making him temporarily deaf. Hibbert also tricks Homer into signing a malpractice waiver. Marge wanted Bart to stay home; however, Bart wants to play in the donkey basketball game.
While at the Springfield Elementary School donkey basketball game, Bart taunts a donkey with a carrot, unaware that the school is reciting the national anthem. After he places the carrot in his shorts, the donkey takes it and rips off Bart's shorts. While Bart is bent over to keep his privates covered with his shirt, the US flag is put up behind him and a photo is taken, which results in the crowd assuming that Bart is mooning the US flag. Shortly afterwards, the Springfield Shopper takes the story and completely turns it around, making it seem as if Bart had deliberately mooned the flag. Marge and Homer tried to tell Skinner that Bart was deaf at the time; however, because Bart's history of pranks Skinner doesn't believe it. He and his family soon are hated by all of Springfield.
Bart and his family do not all hate America. The Simpsons are later asked to appear on a talk show and tell their side of the story. Homer advises Marge to not take it too far. However, the host asks, instead, "What part of America do you hate most?" (an example of the fallacy of many questions). Marge says that, if leading questions such as that are the only forms of discussion in the United States, then she does hate the United States. She also said that she is well liked in Springfield, prompting the host to say that Springfield hates the US. The US then turns their back on Springfield (though there's widespread celebration in praise of Springfield in the Middle East), so Mayor Quimby frantically decides to change the name of Springfield to "Liberty-ville." Everything in town is quickly patriotized; the traffic light colors are changed to red, white, and blue, and everything costs $17.76. While at church, Lisa speaks her opinion about patriotism, and the Simpsons are taken into custody, in violation of the "Government Knows Best Act."
The Simpsons are taken to the "Ronald Reagan Re-education Center", which houses Michael Moore, the Dixie Chicks, Elmo , Al Franken, and Bill Clinton, as well as a man who moans "My only crime was driving a van full of explosives in from Canada!". Marge feels bad that she took it too far after Homer warned her not to. With some help from the last-registered Democrat, the Simpsons escape the prison (in a parody of the escape scene from The Blues Brothers), but realize that the re-education center is actually Alcatraz Prison. While they are swimming to land (choosing to swim to Oakland instead of San Francisco because they "aren't made of money"), they are picked up by a French freighter and are brought to France. They are well adjusted, but still miss the United States, mainly because it is where all their stuff is. They then move back to the US dressed as 19th century immigrants from Europe where Homer speaks of plans of integration into the United States.