In school, the class is assigned to debate the "Change the Flag" issue. Before deciding teams, the children have a day to do some research. Stan, Kenny, and Kyle visit Jimbo and he tells them that the issue of the flag is really about history. Wendy, Bebe, Clyde and Butters, meanwhile, stand alongside Chef outside the supermarket. Chef is gathering support for his cause but the majority of people do not feel strongly enough about the issue to decide either way. Back at class, Stan and Kyle lead the team that wants to keep the flag the same, while Wendy and Cartman lead the side that wants to change it.
During lunch, Kyle and Stan ask Chef for help. Upon hearing that they think that the flag should be not changed, Chef — or rather, Abdul Mohammed Jabar Rauf Kareem Ali, the name that he has given himself since converting to Islam — gets agitated and verbally abusive towards the boys. Stan and Kyle have no idea why Chef is so upset about the flag.
Wendy leads her team in the library when Cartman suddenly interrupts the process with his own strategy. He gets the team to dig up some dirt on Stan and Kyle, hoping to win the debate with ad hominem attacks on their credibility.
The argument back at city hall becomes snafued when a group of the Ku Klux Klan marches up, loudly voicing their support for the current flag as a symbol of "white power". This makes Jimbo, Ned and a number of the other flag supporters uneasy: they do not want to be sided on any issue with the Klan. In order to remedy this issue, Jimbo and Ned disguise themselves as members of the Klan, sneak into one of their meetings and suggest that they switch sides and support the flag being changed. The leader is confounded, but Jimbo explains that, in order to stop the flag from changing, they need to be on the side that they oppose, which will force people on that side to switch since they would not want to be on the same side as the Klan. The leader embraces the idea, and the Klan switches sides. Upon sneaking out of the meeting, however, Jimbo and Ned are spotted in their Klan cloaks by Chef, who drives off furiously before they can explain themselves. A visitor spies on this scene but makes no further appearances.
The mayor invites Chef to see the newly-designed flag, which she believes will be less offensive: the black man on the gallows is now shown smiling. After Chef leaves the room in a huff, the mayor cop out, deciding not to make the decision herself; the fate of the flag will instead be decided by the kids' debate. This puts a lot of pressure on Wendy, who, in their study sessions, begins to develop proximity infatuation with Cartman. This scares Wendy, because Stan is her boyfriend and she and Cartman actually hate each other: she does not realise that she is not really in love with Cartman. One night, she has a nightmare about him and her in love. She wakes up terrified and screams. Bebe later explains the concept of sexual tension to her, advising that she just kiss Cartman to get it out of her system.
During the debate, Wendy is distracted because she is attracted to Cartman and cannot resume her opening remarks until she walks over and kisses him in front of the whole town, breaking the built-up tension. As she continues with her remarks, eloquently and fluidly, Stan is left with the same shocked expression on his face for the remainder of the scene, while a jubilant Cartman silently taunts him from across the room. When the turn of Stan's team comes, Chef and the rest of the adults find out that it had not even noticed that the flag was racist, thinking that the issue at hand was capital punishment. Chef realises that, when the children looked at the flag, they only saw five people, with no regard to their colors, and is touched: he realises that, in believing the whole town racist while throwing the slur "cracker" around, he was being the racist one. After Jimbo and Chef decide to come to a compromise, Kyle declares that they do not need to debate anymore. He then taps Stan, who is still in shock, on the back of the head.
In the end, ethnic diversity is added to the flag: people of all races are hanging the black man, including another black man, and all are happy and holding hands. Chef delivers the moral of this story: his inclination to anti-racism almost made him a racist himself; perceiving things according to race leads only to further racism. In the final scene, Wendy says that she is glad that everything is over with and all her feelings for Cartman have disappeared. Cartman (obviously distraught and surprised) agrees and laughs nervously. Wendy runs after Stan, calling his name, and leaves Cartman completely alone. He sighs and walks away sadly.