Remy is a teenaged rat gifted with some highly developed senses of taste and smell. Inspired by his idol, the recently deceased chef Auguste Gusteau, Remy's dream is to be a chef. However, he is tasked by his dad to sniff out rat poison for his clan. When the clan is forced to abandon its home, Remy is separated and ends up in the sewers of Paris. Remy has hallucinations of Gusteau and takes his advice before finding himself at the skylight overlooking the kitchen of Gusteau's restaurant.
As Remy watches, Alfredo Linguini, a son of Gusteau's "old flame," is hired as a garbage boy by Skinner, the restaurant's current owner and Gusteau's former sous-chef. When Linguini spills a pot of soup and attempts to recreate it—with disastrous results—Remy inadvertently falls into the kitchen and, instead of escaping, "cooks" the soup to perfection. Linguini catches Remy and misdirects the chef's attention from him, whilst taking arguments from Skinner. While arguing, the soup is served and found to be a success. Colette Tatou, the staff's only female chef, convinces Skinner to retain Linguini, who is misattributed with the soup's creation. Linguini is told to get rid of the rat discreetly, but when he discovers Remy's comprehension and intelligence, he takes Remy home, realizing he is the "little chef" behind the soup.
Remy and Linguini find a means to overcome the inability to communicate, as Remy can control Linguini like a marionette by pulling on his hair. Safely hidden under a toque blanche, Remy helps Linguini demonstrate his cooking skills to Skinner. At that, Skinner assigns Colette to train their new cook into the profession and the restaurant's practices. Although she is initially intimidating owing to the struggles she had with the profession's hostility to female entrants, Colette soon warms up to her protege as he respectfully learns under her.
Suspicious of Linguini's newfound talents, Skinner learns that the boy is Gusteau's son and proper heir to the restaurant; this would foil Skinner's plan to use Gusteau's name for marketing microwave dinners. Remy discovers Skinner's evidence and, after eluding Skinner, brings them to Linguini, who removes Skinner. The restaurant continues to thrive, and Linguini and Colette develop a budding romance, leaving Remy feeling left out. One night, Remy finds his brother Emile searching for food behind the restaurant, and is brought back to the pack to be reunited. Despite his father Django's objections, Remy returns to help Linguini.
Restaurant critic Anton Ego, whose previous review cost Gusteau's one of its star ratings (and ultimately the chef's life) announces he will be re-reviewing the restaurant the following evening. After an argument between Remy and Linguini, Remy leads a raid on the restaurant's pantries. Linguini catches them and throws them out. Skinner, who is now aware of Remy's gourmet skills, captures Remy in an attempt of using him to create a new line of frozen foods for him, but Emile, witnessing this event, rushes home to get Django. Remy is freed by Django and Emile, and he returns to the restaurant only to find Linguini had experienced a real problem. Everyone was relying on him to cook the food he did before, but without Remy he could cook nothing. Linguini, spotting the rat, apologizes to him, and shows the rat to the rest of the staff. The staff then walks out because they believe Linguini is insane. Colette later returns after recalling Gusteau's motto, "Anyone can cook".
As the restaurant fills up with anxious diners, Django arrives with the rest of the pack, offering to help after seeing his son's determination. Remy directs the rats to cook for the patrons while Linguini runs the front of the house. Unfortunately, the health inspector bursts in, ready to inspect but finds a bunch of rats. Some rats take care of him (they have him bound and gagged and thrown into the giant pantry) and the others get to work cooking. For Anton, Remy and Colette create a variation of ratatouille which brings back to Anton memories of his mother's cooking. Skinner, after tasting the same dish, bursts into the kitchen in a fit of pique, discovers the rats' involvement in the cooking, and is summarily thrown in the pantry along with the health inspector that had arrived earlier in the evening. After dining, Anton requests to see the chef; Linguini and Colette wait until the rest of the diners have left to introduce Remy and the rats to Anton. Anton writes a self-castigating and glowing review for the newspaper the next day, stating that Gusteau's chef is "nothing less than the finest chef in France."
Despite the positive review, Gusteau's is closed down due to the rodent infestation, and Anton loses credibility as a critic. However, Anton becomes an investor and eagerly helps fund a popular new bistro, "La Ratatouille", created by Linguini, Remy and Colette, featuring a kitchen designed for Remy to work in, and dining areas for both humans and rats alike.