One summer on Lake Springfield, members of rock band Green Day fail to engage the audience in a discussion about the environment. They are killed when the pollution in the lake erodes their barge, sinking it. During their memorial at Reverend Lovejoy's Church, Grampa Simpson has a spiritual experience and frantically prophesies that a disaster will befall Springfield, but only Marge takes it seriously. Lisa and her new friend Colin, whom she has fallen in love with, hold a seminar where they convince the town to clean up the lake. Meanwhile, Homer dares Bart to skateboard naked but he ends up getting arrested by Chief Wiggum. Soon after Homer adopts a pig from Krusty Burger, which Marge identifies as a part of Grampa's prophecy and warns Homer to get rid of it, but Homer refuses. Homer stores the pig's feces in an overflowing silo, which disgusts Marge. Homer attempts to dispose of it safely at Marge's request, but is in a rush and instead dumps the silo in the lake, critically polluting it. Moments later, a squirrel stumbles into the lake and becomes severely mutated. Russ Cargill, head of the United States Environmental Protection Agency, informs President Arnold Schwarzenegger on Springfield's pollution crisis and presents five options to solve the problem. The President randomly picks the third option: the action of enclosing Springfield in a giant glass dome. When Homer's silo is discovered, the townspeople form an angry mob, ransack the Simpsons' house and attempt to hang them. After a failed attempt by Flanders to save them, the family escapes through a sinkhole that Homer had hidden using Maggie's sandbox, which destroys the house soon after, and flee to Alaska using a truck Homer later wins at a contest thanks to Lisa's help, where they restart their life. After three months of failed escape attempts, cracks finally start to appear in the dome. Cargill, not wanting news of what he has done to spread around the world, lets President Schwarzenegger pick from another group of five options again, this time tricking him into choosing the fourth option: destroying Springfield. The Simpsons see an advertisement of Tom Hanks promoting a new Grand Canyon on the site of Springfield. Realizing that their hometown is in danger, the family decide to save it except for Homer, who objects to helping the people who tried to kill them. The family abandons Homer, but are captured by the EPA and placed back inside the dome. After an encounter with a mysterious Inuit shaman, Homer has an epiphany that he must save the town in order to save himself. Homer learns about his family's capture as he returns to Springfield, during which a helicopter lowers a time bomb suspended by rope through a hole in the roof of the dome. Homer enters the dome and descends down the rope, knocking the escaping townspeople and the bomb off. After reuniting and reconciling with Bart, they use a motorcycle to travel up the side of the dome and Bart throws the bomb through the hole seconds before it detonates, shattering the dome and freeing the town. Cargill appears with a shotgun, attempting to kill Homer and Bart for thwarting his plans, but Maggie knocks him out by dropping a large rock on his head. The townspeople praise Homer, who reconciles with Marge as Springfield begins restoring the town and the Simpson household.