The book begins with the Baudelaire orphans and Mr. Poe on the grounds of Prufrock Preparatory School. Violet, Klaus and Sunny Baudelaire meet Carmelita Spats, a rude girl who calls the Baudelaire orphans "cakesniffers". Mr. Poe tells the children to go to Vice Principal Nero's office. On their way there, they notice the school's motto: Memento Mori ( Remember You Will Die ).
They go to meet Vice Principal Nero, the arrogant head of the school. He explains the rules of Prufrock Prep, reassuring them that his advanced computer system will keep their enemy, Count Olaf, away, but that due to a lack of parental permission to sleep in the students' dormitory, the children will live in the "Orphans' Shack". He also explains that Sunny will have to work as his assistant, as she is too young to go to school.
Reluctantly, the Baudelaire orphans go to the shack and find that it is crawling with crabs and has dripping fungus and horrible wallpaper. The orphans go to lunch; Carmelita Spats mocks them again as they try to sit down. Duncan and Isadora Quagmire ask the Baudelaires to sit with them. The Quagmires are in a similar situation to that of the Baudelaire orphans—they are triplets, but their brother, Quigley Quagmire, died in a fire along with their parents. They, like the Baudelaire orphans, were left an enormous fortune in the form of sapphires. Duncan would like to be a journalist, and Isadora is a poet (who writes couplets). They both have notebooks,or commonplace books, which they use to write down observations and notions.
Violet's teacher, Mr. Remora, is a man who tells very short, dull stories while eating lots of bananas as the children take notes. Klaus's teacher, Mrs. Bass, obsesses over the metric system and makes her students measure countless dull objects.
Later, they are introduced to Coach Genghis. The Baudelaire orphans immediately recognize him as Count Olaf in disguise but pretend to be fooled. He makes an unusual remark about how orphans have stronger legs. Then they all rush to the auditorium to listen to Vice Principal Nero's daily concert, in which the entire school is forced to listen to Nero playing the violin for hours. At the concert, the Baudelaire orphans decide that they will go to Vice Principal Nero's office the next day to drop hints about Genghis, but they are thwarted by "Coach Genghis", as he is present in the office.
At lunch, Carmelita Spats delivers the message that the Baudelaire orphans are to meet Coach Genghis on the front lawn at sundown, the time of Nero's violin concert. Genghis makes them paint a circle and run "Special Orphan Running Exercises" or S.O.R.E. laps around the luminous circle at night, for nine days. Violet and Klaus start failing their tests, too exhausted to tell one end of a metric ruler from another. Sunny's work suffers because she runs out of staples.
Then Vice Principal Nero tells the children that if they keep failing their tests, they are going to be tutored by Coach Genghis, and that Sunny will be fired. He says that they will have extra-hard comprehensive exams the next morning. He also demands that they give him nine bags of candy each (which he mistakenly counts as 29 bags of candy, instead of 27), as punishment for missing his concerts, and give Carmelita Spats earrings for each time she brought them a message.
The Baudelaires go see the Quagmires and tell them what happened. Then the Quagmires plot a plan. The Quagmires disguise themselves as Klaus and Violet, get a sack of flour to represent Sunny, and do the exercises (at night) so that the Baudelaire orphans can study and make staples (Coach Genghis doesn't know that it's the Quagmires that are running because it is night time and he can't see them.) The Quagmires leave their notebooks with Violet and Klaus so that they can study. Violet invents a staple-making device (using a small crab, a potato, metal rods, creamed spinach, and a fork) and makes staples while Klaus reads the notebooks out loud.
The next morning, Vice Principal Nero and the two teachers, Mr. Remora and Mrs. Bass, come to the Orphans Shack. They test Violet and Klaus, and give Sunny a stack of papers to staple. All three of them pass, without missing a single question/messing up a single stack of papers to staple. Then Coach Genghis arrives. He has discovered, by trying to kick Sunny, that Sunny had been substituted with a sack of flour. Genghis uncovers the Quagmires' disguises as a result, and gives them canteen duty. The orphans, unable to stand it any longer, attempt to reveal that Coach Genghis is Count Olaf. About that time, Mr. Poe comes to deliver the candy and earrings. Vice Principal Nero tells him that the orphans have been caught "cheating", and announces that the Baudelaire orphans are going to be expelled, despite Mrs. Bass and Mr. Remora's attempts to defend them.
The Baudelaire orphans tell Mr. Poe that Coach Genghis is Count Olaf. Coach Genghis runs out of the shack, and after the orphans manage to remove his disguise, he succeeds in kidnapping the Quagmires. The two lunch ladies remove their metal masks and reveal themselves as Count Olaf's assistants, the white-faced women. The orphans see Olaf's assistants shoving the Quagmires into an old car. Before they close the door, Duncan yells to the Baudelaire orphans "Look in the notebooks! V.F.D.!" before they are captured. Unfortunately, Olaf steals the notebooks before he and his henchmen drive away. The orphans are then taken away by Mr. Poe to be placed with yet another guardian.