At the Krusty Krab, SpongeBob is cooking and Mr. Krabs is having a "money bath," a health inspector arrives for a surprise inspection. He tells SpongeBob to get him everything on the menu, which he does. After a few dishes, he orders one ordinary Krabby Patty before he can pass judgment.
Meanwhile, a television report reveals that someone is passing himself off as a health inspector to obtain free food. Outraged at the thought of giving free food, Mr. Krabs believes that the health inspector that is on their premises is the impostor, and thus he and SpongeBob make a "Nasty Patty," a Krabby Patty that has been made with Volcano Hot Sauce, seahorse radish, toenail clippings, then dropped into the toilet and dried with Mr. Krabs' gym socks.
Later (After Making the "Nasty Patty")
Just before the health inspector eats it, a fly goes into his mouth, chokes him, and knocks him out. As SpongeBob and Mr. Krabs enjoy watching him suffer from the kitchen thinking he already ate it, another TV report comes on that reveals that he was not the impostor.
They believe that their patty killed the health inspector, and begin to panic. They keep giving each other the blame, and ultimately decide to take the body and bury it.
SpongeBob, Mr. Krabs, and the "dead" body of the inspector go up the hill, SpongeBob humorously disgusted with the body, and repeatedly spraying himself and the body with disinfectant and dragging it with a tissue. Mr. Krabs orders SpongeBob to dig a hole to bury the body in, and after hitting a rock, SpongeBob throws it out of the way—and on to the health inspector's head, who was just waking up, knocking him back into unconsciousness. The police then suddenly arrive, offering to take them back to the Krusty Krab. SpongeBob is too shocked for words, and becomes extremely nervous. The rain causes the mud on the hill to erode, exposing the body of the health inspector. SpongeBob puts it in the trunk of the car. By this point, SpongeBob has humorously become maniacal with his nervousness, and slides in the car without any motion. SpongeBob and Mr. Krabs discuss the plan on what to do with the body, and nearly reveals it to the officers, only to be quickly stopped and saved by Mr. Krabs. By this point, the suspicion is raised between the police and SpongeBob and Mr. Krabs.
Same Time at The Krusty Krab
SpongeBob is in charge of taking the body and the shovel and stowing it into the freezer. However the back door is locked, leaving SpongeBob to carry on his most difficult task: he marches through the front door—with the body stuffed hilariously into his hat, making him lose his balance as he struggles to walk over to the door to the kitchen freezer. The officers question Krabs about SpongeBob's strange behavior, only for him to attempt to stall them and bribe them with money. The officers are then called through their walkie talkies and receive a report about two people burying a body on the hill—obviously SpongeBob and Mr. Krabs with the inspector. But as they are about to leave, the officer wants a soda, which Mr. Krabs quickly hands over. But then the officer wants ice as well, and Mr. Krabs grows really nervous—which only makes the officer nearly march into the freezer. But Mr. Krabs, nervous beyond definition, barricades the door and barrels excuses about the ice. The police simply shoves him aside and is about to get the ice herself, when they confess their crimes. SpongeBob and Mr. Krabs throw blackmails and blame on each other, and when they reveal that the body is supposedly in the freezer, she opens the door, and there is nothing there. She thinks it's a joke, and closes the door. She jokingly suggests that he became a zombie and walked out, and the health inspector suddenly appears behind them. The police begin savagely beating him, believing him to truly be a zombie, and after they figure out that he is, in fact, alive, the health inspector shows Mr. Krabs and SpongeBob the review sheet, which reveals that the Krusty Krab passed the test earlier that morning.
Ending: Fade Back to the Opening Footage of Bikini Atoll
At the end, the Narrator is revealed to have been telling the entire story, remarking that "they are all idiots, aren't they?" After saying that, it fades to black.
In Indonesia, due to ads and possibly because of it's one of the most controversial scene, after SpongeBob and Krabs screams, it's usually skipped to the scene where SpongeBob bringing the inspector to the back.
SpongeBob mentions the episode title when he says "I call it the Nasty Patty".
This was the first Krusty Krab episode that didn't include Squidward.
This is the second appearance of Volcano Sauce. The first is in "Karate Choppers". However, the Volcano Sauce Drop didn't appear.
The "Stop right where you are!" quote Officer John says is in reference to the 1954 cartoon classic "Quack Shot."
After the health inspector drops the Nasty Patty, it looks like a normal Krabby Patty.
While SpongeBob is telling Mr. Krabs, "But you told me to give it to him!," his nose quickly flashes blue.
When the police stop Mr. Krabs and SpongeBob, their car only has front seats. However, when Mr. Krabs and SpongeBob get in, there are two or three back seats.
When Mr. Krabs gives the soda to Officer Nancy and says, "Always a pleasure to serve the folks in blue. Well, good bye now!," "to serve the folks in blue" is missing from the captions.
When Mr. Krabs says "Ice? Is that what you want? Ice is what you want?," the last "what you want" is missing from the captions.
When Mr. Krabs says "Ahoy there, SpongeBob! I thought you were out back taking care of that shovel!," he has no teeth when he says "shovel."
When SpongeBob was dragging the health inspector to bury him, his hat is missing. But when he slides down the hill, the hat is back on.
When SpongeBob and Mr. Krabs are burying the health inspector, his head is sticking out with the rest of his body in the ground. But when they are talking to the police, he is buried in the traditional way: horizontally.
When Mr. Krabs is talking to SpongeBob after SpongeBob says that the Krusty Krab is "the most perfect place in the universe," Mr. Krabs is not wearing any clothes.
When Mr. Krabs was taking a bath in money, soap bubbles were seen rising out, which is not possible as there is not even water nor soap in the tub he was in or else his money will be soggy and ruined.
When SpongeBob and Mr. Krabs are laughing and screaming about killing the health inspector, the stove is sitting to the right of the order window. Normally, it is centered under the order window.
When SpongeBob and Mr. Krabs are burying the health inspector, SpongeBob tells Mr. Krabs that he kept his head above ground in case he needed air, despite the fact that they are underwater.
At some point during the episode, the captions stop, and they come back on when Mr. Krabs says "Okay, I confess!," or when SpongeBob says "The dark deed you requested is done, sir." The caption for the line that the captions return at is a glitch.
For the whole episode, the fry strainers are missing from the kitchen.
In earlier episodes, SpongeBob was upset by the sight or thought of defiling a Krabby Patty. This time, he eagerly does just that with help from Mr. Krabs, though Mr. Krabs threatens to fire him if he didn't help him defile it.
After the health inspector falls, Mr. Krabs and SpongeBob should've noticed the Nasty Patty didn't have a bite in it, thus proving it was not responsible for his "death." They were probably too panicked to notice.
The health inspector would probably be dead after choking and being hit in the head five times.
Unlike the other episodes, the entire back of the Krusty Krab is metal in this episode.
Xfinity erroneously lists this episode as "The Nasty Patty."