After learning that Homer is seriously underqualified for his own job, Mr. Burns enrolls him at Springfield University. While there, Homer befriends three nerds and Bart gives them a prank while Homer accidentally gets the nerds expelled for it.
Inspectors from the Nuclear Regulatory Commission arrive at Springfield Nuclear Power Plant to conduct a surprise evaluation of employee competence using the simulated workstation in their van. Smithers, reacting quickly, gives the three least-gifted employees (including Homer) the busy-work task of guarding a bee in the basement to hide them from the inspectors. However, Homer accidentally breaks the jar containing the bee and it escapes. Homer chases after the bee and ends up emerging from a manhole right next to the van, thus being noticed by the inspectors in spite of Smithers' best efforts.
When Homer gets his turn in the van's simulator, he manages to cause a meltdown even though the van doesn't have any nuclear material in it. Mr. Burns first tries to bribe his way out of the situation, but the inspectors are unmoved. Burns then tries to bodily eject the inspectors from his office by using his trapdoor, but that doesn't work due to his office having been rearranged. The inspectors rule that Homer needs college training in nuclear physics to be qualified for his job. Homer applies to several colleges, but is rejected by every one. Burns then exerts some personal influence to get Homer admitted to Springfield University.
Now a college student, Homer is under the impression (thanks to watching movies such as School of Hard Knockers) that it will be like a cliché college comedy, where it is his duty to hassle nerds and stand up to the overbearing old fuddy-duddy dean. In fact, there is no jock/nerd enmity at Springfield University, and the dean, Bobby Peterson, is a young, hip, laid-back, go-getter—completely non-stereotypical—who plays bass guitar and encourages the students to call him by his first name. However, this doesn't stop Homer from nurturing a resentment for the dean.
Homer also delights in hassling the ever-patient Nuclear Physics Professor, and causes a meltdown in class when the professor asks him to demonstrate how a proton accelerator works. Dean Peterson then assigns Homer to supplemental tutoring, and Homer meets the nerd trio of Benjamin, Doug, and Gary. Unlike the dean, the nerds are totally stereotypical, hanging out on their computers all day while telling jokes from Monty Python routines.
In an effort to get the nerds to loosen up and live a little, Homer decides to take the nerds on a road trip with several cases of beer. His plan fizzles when Marge makes him take Bart and Lisa along and they end up going to a petting zoo. Homer's next idea is to pull a prank, and Bart helps them to plan the kidnapping of Sir Oinks-A-Lot, the pig mascot of Springfield A&M. They bring the pig back to Springfield University, and Homer gets the pig drunk (and sick) by splitting a case of malt liquor with him. Dean Peterson catches the nerds (but not Homer) with the drunken pig, and the dean is forced to expel the nerds from Springfield University due to the influence of the pig's powerful friends, one of whom is former U.S. President Richard Nixon. Homer, however, gets off scot-free.
Feeling guilty for his role in getting the nerds expelled, Homer invites the nerds to stay in the Simpson home since they have nowhere else to go. However, they quickly get on the nerves of the rest of the family: Using the phone line to hook up their computers, leaving their retainers in the dishwasher, and interrupting a much-anticipated Itchy & Scratchy cartoon. The latter is the last straw as far as Bart is concerned ("Dad, start diggin' some nerd holes"), and even Marge has had enough, saying "I want those geeks out of my house."
Homer hatches a scheme where he will drive his car at Dean Peterson and the nerds will push him out of the way at the last second, thus saving his life, earning his gratitude, and being let back into school. The nerds blow their part (due to debating whether they need to calculate for wind resistance), and Peterson gets run over. Homer visits Peterson in the hospital and confesses to his part in all the pranks. Touched by Homer's honesty, and conceding that he may have been a bit of an ogre himself, Peterson rescinds the nerds' expulsions and allows them back into school.
All is well until Homer realizes that it's time for his final exam in Nuclear Physics. The nerds help Homer to "cram like you've never crammed before!", but he fails the test anyway. The nerds then hack into the college's computer and change Homer's grade to an A. Marge, however, protests that Homer's cheating is setting a terrible example for the children and makes him retake the class. During his retake, Homer pursues several stereotypical college activities (as seen in a montage of photos): Waterskiing in a toga; getting into a food fight; apparently being hazed into a fraternity (a naked Homer is shown being spanked with a paddle by several fraternity boys wearing red hoods); shoving several students, including Doug, Benjamin and Gary, into a telephone booth; teaming up with Dean Peterson to pull a Bra Bomb prank on Richard Nixon; and pushing Dean Peterson into a swimming pool. Eventually, Homer manages to pass the course (presumably fairly) and graduates, although he also manages to flash the crowd while receiving his diploma.