Aspiring scientist Flint Lockwood lives with Tim, his widowed father, and his pet monkey, Steve, in Swallow Falls, an island in the Atlantic Ocean with an economy based on sardines, which the world has turned against. Flint invents the “Flint Lockwood Diatonic Super Mutating Dynamic Food Replicator” (FLDSMDFR), which transforms water into food. Flint connects the machine to a power substation and it rockets through town, destroying the town square before soaring up into the sky. Flint meets weather intern Samantha “Sam” Sparks, whose first news report was accidentally ruined by Flint’s machine. Their conversation is cut short when cheeseburgers begin raining from the sky.
The town rejoices in their new food choices and Flint orders the machine to create different types of food. Swallow Falls is renamed Chewandswallow and becomes a “food tourism” destination. Flint takes Sam to a palace made entirely out of gelatin, where Sam reveals that she was teased as a child for her glasses and her fascination with meteorology. Gradually the townsfolk become greedy and Flint notices that the food is “over-mutating,” growing larger in size. Mayor Shelbourne, now morbidly obese, schemes to use Flint’s invention for his own gain. A tornado formed of spaghetti and meatballs threatens the town. Flint tries to turn off the FLDSMDFR by sending a “kill code” but the mayor throws a giant radish at him, destroying the communication device after ordering a Vegas-style all-you-can-eat buffet. The FLDSMDFR becomes sentient and creates a massive food storm threatening the entire world. Colossal food downpours terrorize various cities and their landmarks.
Flint places the kill code in a USB flash drive and builds a flying car to reach and destroy the FLDSMDFR. While Earl organizes the evacuation of the town, Flint, Sam, her cameraman Manny, Steve, and Brent discover the FLDSMDFR has surrounded itself with a giant meatball for protection. Reaching the interior, the flash drive containing the code is lost. Flint calls his dad, Tim, to go to his computer to email him the kill code. When they are attacked by living roast chickens, Brent, Flint’s bully in school and local celebrity, gets eaten by them. However he emerges from the chicken having a change of heart and apologizes to Flint by fighting off the living roast chickens. Meanwhile in Chewandswallow, a dam containing all the leftover food breaks, causing a foodalanche destroying the town. However, the townsfolk escape by creating rafts out of toast and make it to the water just before the foodalanche reaches them. Sam’s peanut allergy is triggered by a piece of peanut brittle, and Flint tells her to return to the plane while he carries on alone. The two profess their love for each other and Flint selflessly cuts the rope and plummets down. Sam and Brent make it back to the plane to get allergy medication.
In the tunnel Flint connects his phone with the kill code sent by Tim to the FLDSMDFR but discovers Tim sent the wrong file. He uses his Spray-On Shoes formula on the machine, causing it to overload and destroy the meatball. The food storm subsides and everyone returns to Chewandswallow. Flint survived the explosion by letting go and falling down the blowhole at the last moment before the explosion and is brought to the shore by Ratbirds (rats with parrot wings created by Flint). Tim finally shows his appreciation for his son and his inventions, and Flint and Sam celebrate with a kiss.
The Mayor, who had abandoned the townsfolk on his own toast raft, is stranded in the water. He mutters to himself “This was not well thought out” before eating his boat.