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 a popular 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 for short). 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.
During this time, Hubie, Marina, Rocko, Splatter, Petra, Beanie, Timmy, Pikatwo, Bonkers, Fawn and Buck along with Zazu and Maren arrive at Swallow Falls via Maren's boat. They are looking to spend a quiet vacation there, despite the island's reputation. They even attend the opening of the the island's attraction, Sardine Land.
When Flint turns the machine back on, it ends up rocketing through town, causing various damage, surprising our heroes and 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. Hubie and his friends are astounded by the phenomenon.
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, Hubie, Marina, Rocko and Splatter, Steve and Brent (namesake of the Baby Brent Sardine cannery). The bird kids, Bonkers, Fawn, Pikatwo, Buck, Zazu and Maren stay behind to help the tourist make boats out of sandwiches.
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 bird kids, Bonkers, Fawn, Pikatwo, Buck, Zazu, Maren and 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 the USB port. To his frustration, Flint discovers that Tim sent him the wrong file, so he is unable to stop the FLDSMDFR. Flint then uses his Spray-On Shoes formula on the machine and causes it to explode. With the machine destroyed, the food storm subsides and everyone is able to return safely to Chewandswallow. Hubie, Marina and the others reunite with their other friends. They think Flint is dead until the rat birds bring him down from the sky. He is injured, but alive.
Tim finally shows his appreciation for his son and his inventions before Flint and Sam celebrate with a kiss (as do Hubie and Marina, Bonkers and Fawn, Rocko and Splatter). 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.