After a series of misadventures, the Simpson children are put in the custody of Ned and Maude Flanders. Learning that none of the children have been baptized, Ned sets up a baptism - which Homer and Marge thwart just in time.
Homer gives Marge a surprise trip to a relaxation center. Despite Marge's warning for them to clean up and give the children fresh clothing before they leave, Homer refuses and willingly abandons the children under the ineffective care of Grampa. Meanwhile, Bart has gotten lice from Milhouse's monkey, forcing him to have his clothes burned by the school. Lisa has had her prescription shoes stolen by bullies. They come home wearing bags, finding that their parents are not home and the child welfare agency (prompted by Principal Skinner) has taken offense at the poor conditions of the house (the household chores were simply postponed, but the agency misinterprets such signals as a stack of 20-year-old newspapers obtained for Lisa's history project, and Grampa is sleeping on the family couch). Homer and Marge arrive as the agents take Bart, Lisa, and Maggie, convinced Marge and Homer are bad parents.
The Simpson kids are taken to a foster home - right next door, at the house of Ned Flanders. The kids have to get used to Flanders' style nachos (cucumbers with cottage cheese), bedtime when there's still light, and hours of Bible Bombardment. Bart and Lisa hate it, but Maggie enjoys being there, not just because she's a baby but also because Flanders pays her more attention than Homer does. When Ned finds out that none of the Simpsons were baptized, he faints and takes it upon himself to give the kids a proper baptism.
Meanwhile, since there's no way for Homer and Marge to talk to their children, even by phone. Bart and Lisa help them out using a newspaper editing machine that Rod and Todd has and lets Homer and Marge know how much they miss being Simpsons. With a sense of newfound hope, they take classes to become better parents as they are forced to attend a basic class on home care, including such lessons as putting garbage into garbage cans, and leaving milk either in a refrigerator or a cool, wet sack. While Homer learns well, Marge is genuinely humiliated when she remembers the actions of his earlier behavior that lead them to losing Bart, Lisa and Maggie in the first place. Although she presumably fails the class, it was revealed there was a marginal error between the scores and Marge actually passed. In the end, she and Homer are declared fit parents.
When they go to pick up the kids, they see only a note saying "Gone Baptizin'". They quickly head for the Springfield River, where Ned is about to baptize Bart. Homer arrives at the scene just as Flanders is about to sprinkle holy water over Bart's head (baptism as practiced by Protestant and Evangelical congregations tend not to involve the use of holy water at all). Homer pulls Bart over and the holy water falls upon Homer's head instead, baptizing (or burning) him. Homer has a moment of grace after his baptism but quickly reverts to his old self and angrily reclaims his kids from the Flanders. Nevertheless, Maggie would rather stay with the Flanders than with Homer, Bart and Lisa, until Marge shows up. The Simpson family is back together again, and they head home together, mocking the old paint cans in Ned's garage. Homer and Marge apologized to the children for what happened and promises that Grandpa will never babysit them again.