Flint Lockwood is a wannabe-scientist who lives in Swallow Falls, a tiny island in the middle of the Atlantic Ocean that has sardines as the base of its economy. Flint lives with Tim, his widowed technophobic father who misunderstands his son’s talent, and his pet monkey, Steve. Despite Flint’s zealous enthusiasm, his inventions, including spray-on shoes, a remote controlled television, rat birds, hair-un-balder, and a flying car, all ended in failure. Flint states that his dream was to help his hometown and that Swallow Falls used to be famous for sardines until the popular Baby Brent Sardine cannery went out of business permanently.
Flint then invents a machine that transforms water into food, called the ”Flint Lockwood Diatonic Super Mutating Dynamic Food Replicator” (FLDSMDFR). Flint turns on the FLDSMDFR in his laboratory, but ends up overloading the house’s electrical supply. He then decides to power the machine by hooking it up to a nearby power plant. When he turns the machine back on, it ends up rocketing through town, causing various damage, ultimately shooting up into the sky. While recovering from his failure, Flint meets Samantha ”Sam” Sparks, a weather intern whose big break was foiled by Flint’s actions. Their conversation is cut short when rainbow colored clouds float over the town and begin to rain cheeseburgers.
The town rejoices in their renewed food choices, and Flint creates a communication device to send orders to the machine and order it to create different types of food. Swallow Falls (now renamed Chewandswallow) suddenly becomes a successful ”food tourism” destination. Everything is going well until the townsfolk start greedily requesting food from Flint’s machine. Flint notices that the food is beginning to grow larger in size. Although he is concerned that the food is starting to ”over mutate”, the now morbidly obese mayor sees it as profitable for him and the city, and guilts Flint into continuing to make food rain.
Citizens and worldly tourists in Chewandswallow are blissful until suddenly a large tornado formed of spaghetti and meatballs threatens the town. Flint rushes to his lab to turn the FLDSMDFR off and attempts to send a ”kill code” to stop the machine, but the mayor destroys the communication device by throwing a giant radish at it before he can do it. With Flint unable to control the machine, a massive food storm is created which threatens the world. When Flint’s father encourages him to fix the mess, Flint gains self-confidence, places the kill code in a USB flash drive, and builds a new flying car to reach and deactivate the FLDSMDFR, with the aid of Sam, her cameraman Manny, Steve and Brent (namesake of the Baby Brent Sardine cannery).
As they approach the machine in the sky, they find that it is now at the core of a giant meatball, where clouds go in the top and a food hurricane goes out the bottom. The machine sends sentient food to attack them. In the chaos, the flash drive with the kill code is sucked by the wind out the window.
Back at Chewandswallow, the citizens and tourists escape while the last leftovers fall. Mt. Leftovers collapses, causing an avalanche of food that destroys the town. Despite the avalanche ravaging Flint’s Lab, Tim manages to re-send the kill code to Flint’s cell phone from there. Flint then goes inside the meatball, finds the machine, and connects the phone to a port. To his dismay, Flint discovers that Tim sent him the wrong file, so he is unable to stop the FLDSMDFR. Flint then gets an idea and uses his Spray-On Shoes formula on the machine, causing it to explode. With the machine destroyed, the food storm subsides and everyone is able to return safely to Chewandswallow. Tim finally shows his appreciation for his son and his inventions before Flint and Sam celebrate with a kiss. Meanwhile, the obese mayor is seen stranded in the middle of the sea, having eaten nearly all of his peanut butter and jelly sandwich boat, while muttering that his plans were not well thought out.