"The Boy Who Knew Too Much" is the twentieth episode of Season 5.
Bart skips class and witnesses a waiter brutally beaten. The Mayor's nephew is blamed, but Bart can clear his name—however, it would mean coming clean about skipping school.
On a sunny day in Springfield, Bart is not excited about going to school; in part because he has to travel there on a prison bus, sit in new chairs that are very uncomfortable and even more so when Mrs. Krabappel informs the class that they will spend two hours longer than usual at school that day. When arriving at school, Bart forges a note claiming a dentist appointment so that he can skip school, but Principal Skinner isn't convinced. He tries interrogating Lisa with Willie about Bart's location, but they only succeed in amusing her by unknowingly switching between the bad cop and good cop.
Skinner, after several unsuccessful and outdated attempts to pinpoint Bart, eventually picks up on his trail. He chases Bart through Springfield, ignoring raging rivers and sheer cliffs and as he finally corners him behind a rock, Bart jumps into a passing car. The car is driven by Freddy Quimby, the nephew of Mayor Quimby, who is going to his eighteenth-birthday party. At lunch, Freddy is served chowder, but he makes fun of the waiter for mispronouncing with a French accent, even though Freddy himself mispronounces with a Boston accent. He then follows the waiter into the kitchen and apparently roughs him up. Bart, hiding under a table, secretly witnesses the true turn of events. Freddy gets charged with the crime, presumably assault and battery and is put on trial.
During the trial, despite Mayor Quimby's attempts to bribe the jury, the whole town seems to believe that Freddy's guilty due to his demeaning behavior and intolerance of how everyone around him says "chowder"; he even threatened to kill his own lawyer and the jury for it. Only Bart knows otherwise and he confesses to Lisa, that he is the only one who actually knows that Freddy didn't assault the waiter. When asked to testify by Lisa, he is reluctant because the only way that Bart can confirm Freddy's innocence is by admitting that he skipped school and thus would face punishment from Principal Skinner. Lisa assures him that if Freddy is innocent then he will be found so by an impartial jury, but to do so, Bart has to confess. Unfortunately, Homer is one of the jurors and threatens to make sure Freddy is convicted for it.
In court, Lisa finally convinces her brother to testify and Bart tells everyone that Freddy didn't assault the waiter, but that the waiter injured himself in a series of clumsy actions. The offended waiter attempts to deny that he is clumsy, but in the process, he trips over a chair and falls out of the window into an open-roof truck filled with rat traps, thus proving that he is highly clumsy. When Lionel Hutz questions how Bart could have seen what really happened when he should have been in school at the time, Bart reluctantly admits that he skipped school. Skinner is jubilant and informs him that he will be facing proper punishment, but Apu tells him to save that for later.
Freddy is cleared of all charges, but the waiter then demanded the judge that Bart gets sent to juvenile hall, claiming he assaulted him. However, Skinner has other plans and the female judge throws the case out. Although praising Bart for being honest and coming forward, Skinner reminds him that this doesn't change the fact that he skipped school. Despite Bart's logical disagreement that his activity of selflessness nullifies his misbehavior and that leaving him in peace would be the fairest thing to do, Skinner is unmoved and not only proceeds to coldly give Bart three months in detention, but then increases his punishment to four months for nothing more than the joy of annoying Bart.
Later that evening Marge tries to talk to Homer about the activities he missed at home but he continuously tries to fool her with his fake glasses. This doesn't serve to fool Marge as she repeatedly takes them off to catch him sleeping.