Martin Prince invites his classmates to his birthday party, but the event turns out to be incredibly boring. To cap off the poorly received party, things come to an abrupt end when everyone becomes ill with food poisoning thanks to Martin's parents serving diseased oysters instead of cake. In the meantime, Principal Seymour Skinner and Edna Krabappel attend and have a conversation which leads to them discovering that they have romantic feelings for each other. They end up kissing in Martin's pink playhouse in an act witnessed by Bart Simpson, who did not get food poisoning since he fed his oysters to Martin's cat along with Lisa who feigns sickness so she could leave without excuse.
Bart plans to reveal what he witnessed, but Seymour and Edna fear that they would be fired if anyone found out and they swear him to secrecy. They hire him as their gofer so they can secretly exchange messages. Bart agrees for a while because the reward for his cooperation is that Milhouse will inherit Bart's poor school record. Eventually, Bart grows frustrated about his home, school and social life continually being interrupted to help them advance their relationship, putting him in embarrassing situations. One afternoon at school, after he is embarrassed in front of his classmates by having to say one of Seymour's messages to Edna out loud, Bart bitterly gathers the entire school in front of a janitor's closet and he opens the door to reveal that Seymour and Edna are making out.
Word of Seymour and Edna's relationship quickly spreads throughout Springfield, with the story growing more illicit and exaggerated with each passing turn by the children. An appalled Chief Wiggum, upon hearing his son Ralph's less than accurate version of the events, alerts Superintendent Chalmers. Chalmers gives Seymour an ultimatum – end the relationship or have both of them face dismissal. Seymour decides that love is stronger than his professional goals, so Chalmers fires him and Edna, expecting them to leave the school at the end of the day.
Bart learns that the couple have lost their jobs and feels remorseful. After Seymour apologizes to Bart for embarrassing him, Bart encourages the former principal to stand up for himself and Edna. Agreeing to Bart's comment, Seymour and Edna lock down the school, call the media (with Bart's help) and make their demands: They want their jobs back and the townspeople to not interfere with their relationship. However, several residents reply with their accusation about the two having sexual intercourse in the janitor's closet described by their children. Seymour insists nothing of the sort happened and that he is a virgin. At first, everyone is speechless, but being on the basis of being such an embarrassing thing for someone his age to admit, it has to be true for them. Realizing that they have overreacted over the relationship, the residents peacefully leave, believing that no one can pretend to be a 44-year-old virgin. Chalmers agrees to reinstate Seymour and Edna as though nothing ever happened, but insists that they keep their relationship at a minimum level during school days. The couple decide to continue their relationship more privately than ever by convincing Bart that they have broken up after thanking him for helping them. They then go back into their relationship and enter the janitor's closet where they continue kissing.