Frank Detorre (Bill Murray) is a widowed slovenly zookeeper in his 40's at the Sucat Memorial Zoo in Rhode Island. Much to the frustration of his young daughter, Shane Detorre, he eats compulsively on unhealthy food and has minimal concern for germs or disease. While trying to eat a hard-boiled egg topped with mayonnaise and salt, it is stolen from him by a chimpanzee. He gets it back, but not before it falls into the filth of the chimp's habitat. When Shane is disgusted by him about to eat it he uses the "ten second rule" as a justification for the unsanitary act.
Inside Frank's body, Osmosis "Ozzy" Jones (Chris Rock), a white blood cell is patrolling the mouth and discovers some germs on the egg. Frank then yawns, pulling them down the throat and into "Immunity" jurisdiction. Despite being told to stay out of the chase, Ozzy follows the germs and accidentally triggers a cramp in Frank's leg. Back in the mouth, some saliva cells are still breaking down the egg when a Scarlet Fever virus named Thrax (Laurence Fishburne) appears and, after burning the saliva cells and their boat, triggers a sore throat.
Meanwhile, Mayor Phlegmming (William Shatner) is preparing for re-election, campaigning with the promise of more junk food. His opponent, Tom Colonic (Ron Howard), is campaigning for a healthier Frank and is currently ahead in the polls. Mayor Phlegmming, however, is planning to secure his re-election by taking everyone in the body on a trip to Buffalo, New York. When he discovers Frank is getting sick, he goes into override (against policies as it requires a vote from city council) and makes Frank take a cold pill to prevent him from going to the doctor.
Ozzy, meanwhile, is chewed out by the Chief for his earlier violation of orders. The Chief then assigns Ozzy to investigate the throat on the condition that he works with a cold pill named Drix (David Hyde Pierce). Thrax, in the meantime, visits Frank's left arm pit to recruit some germs for a big plan and kills off their leader as a demonstration to the other germs. At the throat, Ozzy encounters a gingivitis cell who saw Thrax's earlier attack and refers to him as "The Red Death" before being accidentally frozen by Drix. Then Ozzy and Drix head to the nose where, after Frank sneezes, Thrax and the germs create a stuffy nose to make it seem like Frank's condition is the common cold. Back at Mayor Phlegmming's office, Ozzy tries to inform him that a virus is in the body, but is threatened to be sent down the next nose bleed if he can't keep quiet. Mayor Phlegmming then offers to reassign Drix to another partner, but Drix decides to stay with Ozzy.
While heading to the liver, Drix asks Ozzy why Mayor Phlegmming said Ozzy had a record. Ozzy says that years ago, Frank was at the science fair of Shane's school and ate some oysters off a random kid's science project. Ozzy was in the stomach when he saw some bacteria coming from the oysters. Believing there wasn't time to calling for backup, Ozzy hit the "puke" button, causing Frank to throw up all over Miss Boyd (Molly Shannon), one of Shane's teachers. As a result of this, Frank lost his job and became the town's laughing stock, Mrs. Boyd issued a 200-yard restraining order, and Ozzy got suspended and placed on out-of-the-way patrols ever since. Drix says that Ozzy was justified in his decision as oysters are a breeding ground for any number of dangerous bacteria.
At the liver, a reformed influenza virus informs them that Thrax is big time and is currently in The Zit, a hangout for all the germs in the body. Once there, Ozzy discovers that Thrax plans to invade the hypothalamus and heat up Frank's body, killing him in 48 hours and getting a chapter in medical books. Ozzy is discovered and a fight breaks out. Drix tries loading a freezing grenade into his arm, but it gets stuck so Ozzy takes it and throws it at Thrax, causing The Zit to be burst off of Frank's forehead. Meanwhile, Frank is trying to get Miss Boyd to temporally lift a restraining order so he can join Shane on a father/daughter hike, but the Zit pops onto her bottom lip, making her refusal official.
When Ozzy returns to the Third Precinct, Mayor Phegmming berates him for popping The Zit. Ozzy and Drix tells him that if they hadn't done it, Frank's whole body would be destroyed. Mayor Phlegmming tells Ozzy to be careful of what he says as that kind of talk would cause a panic (in addition to reducing his chances of not getting re-elected). When Ozzy argues that it would make the citizens think more about the body than the trip to Buffalo, Mayor Phlegmming fires him. Drix defends Ozzy by saying Frank would've been in mortal danger if not for Ozzy's invention, but Mayor Phlegmming tells him to leave the body as his abilities are temporary and therefore keep him from proving the truth.
Thrax, meanwhile, survives the explosion and, after killing off his remaining henchmen for suggesting they incubate, decides to launch a lone assault on the hypothalamus by disabling its self-regulative capabilities. Arriving there, he uses his virus infecting finger to destroy the protoplasmic barrier around the gland, and retrieve a DNA bead, causing the body to slowly overheat. Soon after, Leah Estrogen (Brandy Norwood), the mayor's secretary and Ozzy's love interest, discovers his work and alerts security. Thrax manages to evade them, taking Leah hostage and escapes from the brain to the mouth. At the same time, Ozzy, in a movie theater showing dreams from the brain, discovers that Thrax is alive and in the brain when the movie screen turns a feverish red, and the dream becomes a nightmare. Ozzy rushes to stop Drix from leaving the body and manages to convince him to help stop Thrax once and for all. Meanwhile, Frank's temperature continues to rise, causing chaos and destruction to break out all over the City of Frank.
Frank is taken to the hospital under the influence of Thrax's attack. Ozzy and Drix rescue Leah and confront Thrax, who leaves Frank's mouth after causing Frank to sneeze using pollen bombs. Ozzy is launched out after him by Drix, where Ozzy and Thrax fight on one of Shane's eyeballs and end up on Shane's false eyelashes after she blinks, which she was wearing atop her natural ones. During the fight, Thrax threatens to break his own record by killing Shane, but Ozzy tricks him into getting stuck on Shane's false eyelash and fall into a vessel of alcohol below, where he ends dissolving and killing Thrax.
During this time, the situation becomes even more dangerous when the temperature hits 108 degrees, causing Frank to go into cardiac arrest. Just as doctors begin to give up, Frank is revived when Ozzy returns to Frank via one of Shane's crying tears with the DNA chain containing the missing hypothalamus chromosome. Ozzy is reinstated into "Immunity" with full privileges, Ozzy and Drix are declared heroes with the Chief of Police (Joel Silver) giving Ozzy his job back, Ozzy planning on extending Drix's time in Frank with help from the hemorrhoid, and Leah returns his affections.
Sometime afterward, Frank, having survived Thrax's attack, has begun to improve his diet and personal hygiene, as well as his relationship with Shane. Meanwhile, Mayor Phlegmming has lost his position as mayor and now has a new job as a janitor, cleaning the bowels. He accidentally ejects himself from the body via the rectum by touching a button that is important and marked "DO NOT TOUCH!" which triggers flatulence. Frank jokes about it by saying "out with the old, in with the new".
- Timmy, Cosmo, Wanda, Scooby-Doo, Shaggy Rogers, Velma Dinkley, Daphne Blake, Fred Jones, Squire Flicker, Princess Flame, King Allfire, Queen Griddle, Sir Loungelot, Sir Blaze, Sir Burnevere, Sir Galahot, Sir Hotbreath, The Wandering Minstrel, Cinder and Clinker, Megan and Mal (Total Drama) will guest star in this film.
- Megan and Mal will work for Thrax in this film.