Green Day is performing on Lake Springfield, where they fail to engage the audience in talking about the environment. They are killed when the pollution in the lake eats away at their barge, causing it to sink. At the funeral, Grampa has a religious vision, in which he predicts impending doom upon the town, but only Homer's wife Marge pays attention to it. Their environmentalist daughter Lisa and Colin, an Irish boy, hold a seminar entitled "An Irritating Truth", where they convince the town to clean up the lake. Meanwhile, Homer adopts a pig, which causes his now neglected son Bart to seek a parental figure in neighbor Ned Flanders. Homer keeps the pig's waste in an overflowing silo, which horrifies Marge, who tells Homer to dispose of it safely. He instead dumps the silo into the lake, polluting it severely and mutating a squirrel. Nearby, Flanders and Bart bond during a hike and discover the squirrel, and it is captured by the EPA. Russ Cargill, head of the EPA, takes drastic action by placing Springfield in a giant glass dome.
When the police discover Homer's silo in the lake an angry mob approaches the Simpsons' home, setting it on fire but the family escape through a sinkhole in baby Maggie Simpson's sandbox and they flee to Alaska. Meanwhile, cracks in the dome cause Cargill to plan Springfiled's destruction, and in Alaska the Simpsons see a television advertisement which promotes a new Grand Canyon where Springfield is. Marge and the kids decide to save the town, but Homer refuses to help the people that tried to kill him. They abandon him and leave to rescue Springfield, only to be captured and placed back in the dome. After a visit with a mysterious Inuit shaman, Homer has an epiphany that he must save the day, and rushes to save the town. A helicopter arrives above Springfield and lowers a bomb suspended by rope through a hole in the dome. Homer climbs the outside of the dome and descends the rope, knocking the escaping townspeople and bomb off. Homer notices a motorcycle, is reunited with Bart and grabs the bomb. They cycle up the side of the dome and Bart throws the bomb through the hole, detonating it and shattering the dome. The town praises Homer, who rides off with Marge on the motorbike into the sunset. The film ends with everyone restoring Springfield, including the Simpsons' home, back to the way things were.