After Ned Flanders sees an exhibit on evolution at a museum, he and Reverend Lovejoy talk Principal Skinner into allowing the teaching of creationism in schools. When Lisa complains at a town meeting that there should only be one theory taught in schools, Mayor Quimby agrees - and teaching evolution is banned in schools, so Lisa decides to teach a secret evolution class which gets her arrested. Does Marge have something up where her sleeves would be if she didn't always wear a sleeveless dress to help Lisa?
Pressured by Ned Flanders and Reverand Lovejoy, Mayor Quimby is forced to allow the teaching of creationism in schools. Lisa is outraged and demands that the school only teach one theory of life, and unfortunately they choose creationism and outlaw the theory of evolution. Lisa tries to hold secret meetings to keep the theory alive in town, only to have the police arrest her with Chief Wiggum claiming no other crime to be occurring (this being immediately invalidated by the sight of Snake killing people at random).
At her trial, it is clear that the odds are stacked against Lisa, as she is assigned a hated New York lawyer opposed to the overweight beloved southern man promoting creationism and denouncing science. Marge, to better understand her daughter's point of view, finds her copy of the origin of species and becomes engrossed in it, finding herself in agreement with her daughter she comes up with a plan. At the trial, Marge gives Homer a bottle of beer. Homer is ecstatic, but becomes increasingly agitated when he can't open it, eventually acting like a monkey. This causes Ned to crack under pressure and call Homer a 'Monkey faced Gorilla' in front of everyone which Lisa's lawyer capitalizes on by forcing Ned to admit under oath that Homer does indeed look like the missing link that the prosecutors were basing their argument and the case falls apart.
In the end, Lisa comforts a dejected Ned by saying that while she respects his beliefs, at the same time, feels that science and religion should stay separate and that she wouldn't want a scientist teaching religion anymore than priest teaching science--something that Ned can agree with. After that, Todd reveals himself to really be Nelson in disguise, by peeling a latex mask from his face, the screen slowly fades to black and the closing credits roll.