Hal and Dewey accidentally drop an old couch on the railroad tracks while driving it to the dump, and the town ends up being evacuated after a train containing toxic waste derails. While Hal tries to make up to society, Malcolm was an hour and a half late coming home from school, and gets grounded even while they are staying overnight in the school gym, forced to stay on the bed.
Dewey convinces other people that he is an "orphan" in order to get what he wants, and Reese starts running a black market when he realizes that everyone there is in need of basic supplies. At the end, Reese's black market is discovered and Dewey reveals his scheme to Hal in front of the crowd, and the Army forces Hal, Dewey, Lois (who was ejected from the gym due to her "spanking" of Malcolm after he stands up to her over her exaggerated punishment) and Reese to spend the night on the bench outside without moving from it, with Malcolm enjoying his freedom Francis and Eric go on double dates, but Francis' date turns out to be twelve.
Hal removes the plastic off the family's new couch. Lois thinks it's beautiful, she then warns Reese and Dewey they are not allowed to sit, stand, jump on or go anywhere near the couch for the next year, Reese wonders where the anger is coming from. Hal then asks if Dewey would like to accompany him taking their old couch to the dump, at first Dewey refuses but then Hal educates him on how amazing it is and Dewey reluctantly agrees. Malcolm comes in and tells Lois he and Stevie finished their geometry unit and are now two weeks ahead. Lois then grounds him as he promised to help with the couch and Hal and Reese nearly killed themselves, she sentences him to two weeks in his room with no TV, friends or phone, Malcolm is shocked as he thought it would be okay because he was doing homework, Lois states he isn't allowed to decide whether or not something is okay, Malcolm cries out that this is unfair, Reese then sits on the couch and wonders when he had sat in tar. Hal and Dewey sing a song on the way to the dump, however when they arrive they find the couch has fallen off as Hal hadn't tied it down properly. At dessert that night ice cream is served but Malcolm can not enjoy it, after the doorbell rings, Reese mocks Malcolm by describing its taste, Malcolm then says hes rubbing his butt on Reese's pillowcase. Hal answers the door to find a military sergeant named Captain James, who tells him that the entire neighborhood needs to be evacuated due to a train derailing, Captain James says it was caused by someone leaving a couch on the railroad tracks, Hal quiets Dewey from revealing the truth.
Meanwhile, at a diner Francis tells Eric that he is so dead, Eric states he couldn't go on a date with a girl named Laura unless someone else came along for Laura's younger sister Doris. Eric states Francis earned this due to previous situations where Francis has gotten him into trouble. Francis knows Doris is only twelve, Eric states he can still have a nice time or he will hurt him. Francis comments on his violent nature but brushes it off.
The entire town is taken to the school gymnasium, as they head in, Lois hopes they locate whoever is responsible and string them up by their thumbs. Hal then asks a younger military cadet named Edwards if it is necessary to be evacuated telling him about one time he set off a flea bomb in the boys' room wile Dewey was napping inside (Dewey now being able to smell colors). Cadet Edwards then tells them of the severity of the situation, Hal claims it isn't entirely fatal though, Reese thinks it would be cool. Hal continues with string of questions about the situation, Edwards does not have all the answers. In another part of the gym Lois sets up cots for them to sleep on, Malcolm tries to go look around but Lois says he is still grounded, Malcolm is appalled and says they are living in a gym and they could all die. Lois only says it doesn't change what Malcolm did, but if they do all die she'll let him off the hook, until then she demands he sit on a cot and not leave it. Hal walks back to Edwards and asks he needs to help, despite his protest, Hal persists and leaves him utterly terrified. Dewey looks at a couple named Audrey and Jerry enjoying some chocolates, Audrey says she would love to give him one but he should ask his parents. Dewey tells them his parents were killed by the gas cloud, they are both shocked and offer him one, Dewey is now satisfied.
Back at the diner, Eric and Laura are making out while Doris studies and Francis grows impatient. When he returns from the bathroom he finds Eric and Laura gone, Doris claims they'll be back in a few hours after taking the car, due to him using the restroom Doris states he "gave them an opening". Francis wants to leave but Doris angrily refuses to leave until she eats, catching everyone Else's attention. Francis tries to calm her down only to say Laura treats her badly, Doris starts crying and he calls for service, She orders a burger plate with extra fries and a chocolate malt.
Dewey is telling a crowd of people his experience escaping the chemical spill, additionally gaining a GameBoy. Lois gets interviewed but tells the newscaster she can't talk to Malcolm because he is grounded. Malcolm tries hiding his face. Meanwhile, Reese finds all the cups in a the gym due to some idiot leaving the storage closet unlocked and tells Malcolm he is building a future, eventually making a deal with a man who needs a cup but Reese makes him a deal to trade for his supply of canned fruit. Hal is taking care of fellow evacuees only to their chagrin, he then hears the Jerry and Audrey, talking to Captain James about Dewey's dead parents. Hal asks about it, they tell him they were killed by the cloud and his mother saved him with her last breath and the boy had strangle his own dog to stop its suffering and on his birthday, Hal is now overrun with guilt.
Back at the diner Doris orders some apple pie a la mode, chocolate cake and a banana split for dessert. Francis asks her to spare him the money and yell at Laura instead. Doris asks if he is calling her fat, when he denies it she then thinks she is being called a liar, Francis knows she is twisting everything he said and saying it out of context. She then asks him why he touches his hair so much, making him flip out and say his schoolmates call him "Poodlehead" she says it is cruel but real.
Back at the gym, Reese tells Malcolm of his endeavors, after getting the canned fruit he traded it for batteries then swapped the batteries for DVDs and swapped those with the janitor for the schools entire supply of toilet paper and once the specially "seasoned" meatloaf works its magic he can name his price. Malcolm commends him on actually thinking and putting effort into his plan and is impressed. Reese explains when people are miserable it brings out the best in him. Lloyd and Dabney cone over and Reese asks if Dabney still has his PalmPilot he and Lloyd are excited about living in the school and they got the key to the girls locker room, Lois tells them Malcolm isn't allowed visitors and lets everyone in the gym know it. Lloyd and Dabney leave ashamed dropping the key in the process, Malcolm claims his mother only did that to humiliate him and he would never forget it, she is happy knowing for the first time in ten years a punishment will actually stick.
Not long afterwards, Reese is making a deal with a dad who needs blankets for his family and Reese wants his watch as payment, the man contemplates that another patron only had to give Reese his socks. He eventually gives Reese his watch due to persuasion and adding he is an evil punk, Reese then adds he wants his socks too, much to his disdain. Meanwhile, Hal is trying to make people donate to help the orphaned little boy, and makes others feel guilty for not giving enough.
Malcolm's shoe was taken by a little boy, and tortures him knowing he can't leave the cot, making a group of girls laugh at him. Malcolm attempts to get up but his mother quickly catches him, Malcolm tells her about the boy, she says she'll handle it, leading the boy to tease him even more. Lois tells Malcolm to get back on the cot, this is the final straw for Malcolm and he angrily tells Lois no, and announces he quits. Finally coming to the realization that the only reason he was being punished, was because he agreed to be punished, and further adds he will no longer comply, telling Lois this act isn't parenting, merely an act of sadism. Lois responds asking Malcolm if he thinks she enjoys punishing him and Malcolm immediately responds yes. Malcolm tells her they need to change the rules of how to deal with each other, wondering if she plans to take away his TV after he's married, or give him a time-out when he's 30. Malcolm then wonders what Lois is going to do, and suggests spank him. Lois agrees and pulls him into a spanking position, Malcolm is scared and wonders how she got so strong. Lois gives him a slight tap on the buttock, with the onlookers gasping in horror, and Malcolm left in a state of shock. Lois tells her son that once she can no longer do that, then she'll allow the rules to be changed.
Hal continues to campaign for the toxic orphan while continuing to make the crowd feel guilty for their selfishness. Dewey walks up to his father and asks if they can leave, Hal tells him to wait, the husband from the couple recognizes Dewey is his son and tells everyone the reason he was collecting money in the first place. The crowd is furious and Hal assures them he didn't know and he doesn't allow his children to behave like this. Then Captain James walks up to Hal with Reese in tow, telling him Reese was running a black market and had two diabetics bidding against each other for insulin. Reese claims it as a lie before his jacket is opened revealing his swindled goods. Hal then chastises the two boys for their behaviour and orders them to apologize. He puts Dewey on a chair and orders him to say sorry, Dewey apologizes by confessing that they were responsible for the train wreck. Hal throws the money in the air picks up Dewey and tells Reese to run.
Back at the diner, Francis enjoys Doris' company by telling her that he has to keep a tough guy reputation, when really he keeps a dream journal and both he and Doris spin globes and imagine they live wherever they point to. Francis takes Doris home and Eric does the same with Laura, Francis tells his friend that his plan to pawn him off on a 12 year old backfired, admitting he had fun, and he no longer cares about people calling him names. Eric then proceeds to call him poodlehead until Francis gets annoyed.
At the end of the episode, Malcolm gets revenge when after Hal, Dewey and Reese are kicked out of the gym for their actions, and forced to stay inside a line. Hal asks Captain James if they will still be present in the community, Captain James adds if he wasn't in uniform, he'd take a swing at Hal for derailing the train. Lois is kicked out of the gym as well due to her spanking Malcolm and she is dismissed as a troublemaker by Cadet Edwards. Outside the family is freezing and they tap on the window and beg Malcolm to bring them some blankets though he refuses, following his punishment not to leave his cot as Lois had made him.
- This episode marks one of the few times where Malcolm gets the upper hand against Lois and wins a fight.
- Laura is portrayed by Regan Dale Neis, who would later play the recurring character Nicki, with her debut episode being season 4's Forbidden Girlfriend.
- Cadet Edwards is portrayed by Jerry Trainor, who is in Nickelodeon shows like Drake and Josh and iCarly.