A prohibitionist movement emerges in Springfield after Bart is accidentally intoxicated during a St. Patrick's Day celebration. The municipal government discovers alcohol has actually been banned for two centuries, and moves to enforce the law, prompting Moe to disguise his bar as a pet shop. With the town becoming impatient with the police's incompetence, Chief Wiggum is replaced by Rex Banner, an officer of the U.S. Treasury Department.
In the meantime, Homer figures out a way to keep Moe's bar operating, by becoming a bootlegger. One night, he and Bart sneak out to the city dump to reclaim the beer that was disposed of when the Prohibition law was enacted. He then sets up shop in his basement pouring the beer into the finger holes of bowling balls. Using an intricate set of pipes under the Bowl-A-Rama, he bowls the balls into Moe's. Upon discovering it, Marge actually finds it a very good idea (since Homer is actually using his intellectual faculties and that he's making enough money to support the family), though Lisa doesn't, prompting Homer, Marge, and Bart to send her to her room. The media realizes someone's allowing Springfield's underground alcohol trade to flourish, and they give the still-unknown Homer the nickname "Beer Baron". Rex Banner fails to catch the Baron and resorts to stopping people in the street to demand if they are the Beer Baron; he even arrests Ned Flanders who pleads guilty to drinking only root beer.
When his supply of liquor runs out, Homer begins to distill his own homemade liquor. However, his stills start to explode. He is then confronted by a desperate ex-Chief Wiggum. In an attempt to rekindle Wiggum's career, Homer allows the former Police Chief to turn him in. The punishment that awaits him is expulsion from the town (and presumably death) by an archaic catapult, showing how anachronistic the law really was. Marge tells everyone that this law and punishment make no sense and it's meaningless to punish Homer, especially for their freedom to drink. Rex Banner steps up to lecture the town on the reasons why the law must be upheld. While he lectures the assembled Springfield citizens, Wiggum has him catapulted and gets his job back. The town clerk then finds out that the Prohibition law was actually repealed a year after it was put in place, and so Homer is released. Within five minutes Fat Tony is only too happy to oblige when Mayor Quimby asks him to flood the town with alcohol once more, and Springfield salutes its qualities as Homer announces, "To alcohol! The cause of, and solution to, all of life's problems."