Torless is a student in a military boarding school in Hrance (modern day Czech Republic). As an impulsive young man, he finds himself caught up in a restrictive social circle with two friends named Reiting and Beineberg. Secretly Torless struggles to make sense of his sexuality, often suspecting that he's gay. He is an introspective person who spends much of his time thinking about his society. He criticizes his parents' safe approach to life, believing that compromise is not always an acceptable answer to life's immense problems. Under the tutelage of a brilliant math teacher, he learns to exercise his brain in strategic ways.
When the three friends learn that they've been robbed by a fellow student -- Basini, -- they eagerly plot revenge. After confronting Basini with words, Beineberg and Reiting assault him as Torless plays a rather passive third party. He's not eager to get involved in violence, but he feels the disrespect of the robbery keenly. Basini is relentless and unapologetic, tragically for his position. The three other students start systematically abusing him psychologically to the point that they spend the majority of their free time together plotting their next attack on Basini. Although Torless still is hesitant to play a decisive role in the abuse, he does not try to step them and actually assists in some of the plans.
Eventually, Beineberg and Reiting start indulging some very dark impulses much to Basini's poor fortune. He allows them to sexually assault him, offering little to no resistance as time goes on and the assaults persist. Struggling with renewed questions about his sexuality, Torless eagerly participates in raping Basini. For his part, Basini treats Torless with deference, even voluntarily performing sexual acts for him. Torless is impressed by the favoritism, but he is disgusted by Basini's utter lack of self-respect. He wishes Basini would stand up for himself and put an end to the abuse, but he doesn't.
Finally Torless warns Basini that he should turn himself into the school authorities in order to prevent increasingly violent abuse. Basini heeds the warning at last. The consequent investigation is nearly fruitless. They convict Basini for robbery, but they find nothing to suggest Beineberg, Reiting, or Torless have behaved shamefully or illegally. After the investigation, however, the school leadership decides that Torless isn't a good match for the academy. They advise his parents to hire a private tutor, which they do. Torless has already decided that he must leave, unwilling to cope with such an emotionally trying environment any longer. Additionally he feels like his intellect is not sufficiently being challenged by the curriculum, something which the headmaster also notes in his report. Thus ends Torless' dramatic adventure in boarding school.