On the last day of summer vacation, Lisa brings the family to the museum to see a weaving exhibit as her summer activity, but they quickly discover that it has been canceled and replaced by a "History of Weapons" exhibit. Faced with an incredibly long line, Homer notices Ned Flanders and his children at the front of the line and cuts in front of them. Others start taking advantage of Ned’s kindness as well, until the Flanders family is stuck at the end. At the end of the day, they are still waiting, and are denied entry, as it is closing time for the weapons exhibit. They therefore decide to check out the evolution exhibit next door. Ned is horrified to hear that humans evolved from apes and that the creation account in the Genesis is characterized as a myth. Covering his children's eyes, he drags them out of the exhibit.
Ned meets up with the church council to suggest promotion of creationism. The next day, he and Reverend Lovejoy blackmail Principal Skinner into introducing creationism in the school. Lisa is perturbed by this, and at a town meeting asks everyone to make a choice between creationism and Darwinism, as there is only one truth. The townspeople vote for creationism, much to her chagrin, and the act of teaching or learning Darwinism and evolution is made illegal. Lisa therefore decides to start holding secret classes for people interested in evolution. However, just as the first lesson is about to begin, she is arrested by Chief Wiggum. She asks why she's being arrested when there are far worse crimes out there, and embarrassed he tells her they only have enough manpower to enforce the last three laws passed, even stating that it's the worst law system there is. Lisa is brought to trial, which is dubbed Lisa Simpson v. God. Representing her is Clarice Drummond, a despised American Civil Liberties Union (ACLU) lawyer, while on God’s (i.e., Ned's) side is Wallace Brady, a beloved, overweight, southern lawyer. The trial does not go smoothly for Lisa, as Professor Frink (called by Clarice) gives ambiguous answers regarding God's existence, while a creationist scientist says that evolution cannot be real, as there is no proof of a "missing link" (depicted in a picture as a savage hominid, holding a rock over his head).
With Lisa now facing a long jail sentence, Marge decides to help her out. She starts reading Charles Darwin's The Origin of Species and becomes addicted to it. When the trial resumes, Marge tells Lisa that she now knows a way that she can help her. While Ned is being cross-examined by Clarice, Marge gives Homer a cold beer. Homer, ecstatic at getting a beer, tries to open it unsuccessfully. The more he tries, the more primitive he gets, hooting and banging the bottle on the bench, disrupting the trial. Finally, Ned loses his cool and refers to Homer as a "big monkey-faced gorilla." Clarice then asks Ned to compare the picture of the "missing link" and Homer shaking the beer over his head, and asks if he truthfully believes Homer cannot be related to apes. Ned cannot and concedes victory to Lisa. Lisa kindly tells Ned that she fully respects religious beliefs, but she just does not think it is proper for the church to dominate the school, the same way that Mr. Flanders and Reverend Lovejoy do not want scientists taking over the church. Ned agrees and offers to take Lisa and his kids out for ice cream.