Plot
Jim McAllister is a well-liked U.S. history and civics teacher at Carver High School in Omaha, Nebraska. One of his students is Tracy Flick, an academically driven and high-achieving junior whose single mother, Judith, encourages her to strive for success. Earlier in the year, Jim's colleague and best friend, geometry teacher Dave Novotny, was fired and divorced by his wife, Linda, after engaging in a sexual relationship with Tracy. Though Jim believes Dave deserved to face consequences for his actions, he resents the lack of repercussions for Tracy, along with what he sees as Judith's coddling of her.
Jim struggles to conceive a child with his wife, Diane, and subsequently begins to have sexual fantasies about both Linda and Tracy, despite being disturbed by his attraction to the latter. Appalled by Tracy's unopposed run for student government president and dreading further proximity to her, Jim persuades Paul Metzler, a popular, good-natured but dimwitted football player, to enter the race. Sidelined from football with a broken leg sustained in a skiing accident, Paul finds that his candidacy gives him purpose. It also infuriates Tracy, who had expected to run unchallenged.
Tammy Metzler, Paul's adopted younger sister, attempts to seduce Lisa Flanagan, her best friend. When a disgusted Lisa rejects her and immediately begins dating Paul and managing his campaign, Tammy retaliates by running as a spoiler candidate. In her speech at a school assembly, she denounces student government as a sham and vows to dissolve it if she wins, rallying the students to a standing ovation. The principal, Walt Hendricks, retaliates by suspending her.
Late one Sunday night, while working on the school yearbook, Tracy sees that one of her campaign posters has fallen from the wall. While attempting to reattach it, she accidentally tears the poster, then furiously destroys the other candidates' campaign posters and discards them in a dumpster, unaware that Tammy is watching. The next day, Jim confronts Tracy about the posters. She feigns innocence and trades threats with Jim, but Tammy rescues her by appearing with the torn posters and falsely claiming responsibility. The school expels Tammy, and her name is removed from the ballot.
Jim has a tryst with Linda the day before the election. She asks him to rent a motel room for an afternoon rendezvous, but fails to attend. When Jim drives to Linda's house to find her, he is stung by a bee on his eyelid. He returns home find Linda talking with a tearful Diane. Assuming that Linda has told Diane about their tryst, he spends the night in his car.
A dejected Jim oversees the tally of the ballots, which results in Tracy winning by a single vote (cast by Paul). Seeing Tracy peeking in on the vote count and preemptively celebrating, he discards two of her ballots, throwing the election to Paul. The discarded ballots, however, are later discovered and reported by a janitor who dislikes Jim, leading Tracy to become class president. Jim is forced to resign, and the election rigging makes headlines. Diane divorces him, taking the house and most of their joint assets.
Publicly humiliated, Jim leaves Nebraska and fulfills his dream of moving to New York City. He becomes a tour guide at the American Museum of Natural History and begins dating his co-worker Jillian. Following graduation, Paul develops an active social life at the University of Nebraska–Lincoln, though Lisa breaks up with him. Tammy finds a new girlfriend at her all-girls Catholic school. Tracy attends Georgetown University, where she again isolates herself from her peers due to her single-minded focus on academics.
On a sightseeing visit to Washington, D.C., Jim spots Tracy getting into a limousine with a Nebraska congressman. He impulsively hurls a cup of soda at the limousine before fleeing. Later, while giving a museum tour to a group of elementary school children, a young girl enthusiastically raises her hand to answer a question. The gesture reminds Jim of Tracy, and he ignores her.