Preparations for the departure to the capital begin the third part of the trilogy. The main character - Theme Kartashev is full of dreams about how he “will become serious, will be engaged, will be a scientist”, and for his family this is a time of regrets about that ideal Theme that they wanted to see and which they loved. After a month's stay in the village, after careful monthly training, Kartashev, Kornev, Lario, Darsier and Shatsky joined the company to study at the final exams. For Tema, leaving for St. Petersburg means "settling accounts with a past life", with everything that "sent <...>, made it everyday." Arriving in St. Petersburg, the company scattered - everyone went to different educational institutions: Theme - to the Faculty of Law of the University, Kornev - to the Medical and Surgical Academy, Shatsky - to the Institute of Railways.
The first impression of the Theme from Petersburg was strong and pleasant, but then it was replaced by a feeling of loneliness, boredom, and alienation. Waiting for the beginning of the school year at the university becomes tiring for Kartashev, but even more painful is the impression of the “bottomless chaos of the first lecture”. Kartashev, who read Boyle, Chernyshevsky, Dobrolyubov and, according to his own ideas, has reached incredible heights of scholarship, does not understand what is said in lectures. Having no regular and equal communication, Kartashev is in a depressed state due to new sensations and feelings that have rushed over him. Unlike Kartashev, Kornev, despite his first failure at the entrance exam, is more adapted to independent life.
Having entered the Academy with great difficulty, he intelligently arranges his life, “subscribes to reading books,” makes a certain circle of acquaintances from among those students with whom he regularly meets in the kitchen workshop, where he dines. Later, Kornev will introduce Kartashev to the participants of this circle, among whom will be Kartashev Ivanov, a longtime gymnasium friend. But at the first time in St. Petersburg, old friends communicate quite rarely.
This is the reason for the rapprochement of Themes with Shatsky. Kartashev’s plans to catch up, to work hard - to read Hegel and others - remain unfulfilled, and all academic studies end with a joint reading of Shatsky Rokambol, the author of popular adventure novels, and participation in various entertainments and hoaxes of Shatsky, who became famous for them even in high school.
The adventures of the Petersburg period of Shatsky, and with it his new friend Kartashev, are less harmless. The financial affairs of friends, due to frequent visits to the operetta theater and other entertainment venues, soon came to a deplorable state. After the sale of all the more or less valuable things like Shatsky and Kartashev, and the very impoverished Lario, after repeated requests for help to relatives, Kartashev forms a rather significant debt with which he is unable to pay off on his own. But gradually the entertainment bothers Theme; Shatsky turns for him into the "former" idiot "(his gymnasium nickname), and after a big quarrel between his friends, Kartashev moves to a new apartment, decides to radically change his lifestyle, talks more with Kornev. Trips to the operetta are replaced by opera performances (opera is Kornev's long-standing passion), and a Goethe volume appears on Kartashev’s table instead of Rokambol. After a long break, Theme writes a letter to his family, where he talks about his adventures with Shatsky, while experiencing a real creative upsurge, Kartashev thinks about "whether he is a writer."
He works a lot and, although tormented by doubts about his own talent and the value of his “writings,” he decides to show what is written to Kornev. A friend makes a balanced and responsible judgment. He believes that the Theme has already “figured out the welter of life”, but does not yet have a “philosophical basis” for creativity, and calls it “callous master.” Confused by his friend's grades, Theme nevertheless returns to writing experiences during the exams. He is born the idea of a story about a needy student who, unable to bear his plight, is thrown out of the window on Easter. Having finished the story, he takes it to the Delo magazine, and in two weeks he learns about the editorial refusal to publish it.
In addition, Subject, without passing the first exam, submits a letter of resignation from the university. Again closer to Shatsky. Sharing his “theory of the practice of life”, he submits documents to the institute where his friend is studying, also deciding to become an engineer. Having bought gymnasium textbooks on mathematics, Kartashev took up what he “considered already handed over forever to the archives of life”. The messy way of life of Shatsky leads to the fact that he is seriously ill. Only thanks to the efforts of Kartashev, Shatsky receives medical assistance, and Lario, with whom his friends were quite active at that time, is the place of a governor, which, however, does not help to improve his financial situation.
Soon after his expulsion from a technological institute that occurred as a result of student unrest and cost Lario and other students imprisonment in a transit prison, he is expelled from St. Petersburg. But Kartashev and Shatsky pass exams: The topic is introductory, and Shatsky is in the second year. Kartashev leaves for a few days with his relatives, where everyone is satisfied with his decisive act and the choir prophesies a bright future. Upon returning to St. Petersburg, the theme was expected from ordinary institute life: lectures, work in drawing rooms. Without unambiguously joining any of the institute circles, which were more inclined “towards fermentation of the heart than mental”, Kartashev prefers the so-called “emasculated” - a fatal institute majority. Despite his still high school reputation as “red,” Theme goes over to the side of “well-mannered boys,” as Kornev puts it, speaking out against provoking unrest at the institute’s ball. However, soon all institute affairs fade into the background. Kartashev learns that all his many love affairs were not in vain and he is sick with syphilis. He is in a state close to suicide, but rescue help comes from home. His mother’s brother arrives, “the kind Uncle Mitya,” who, having paid all the nephew’s debts, pretty much arguing with him about God and the difference in views of “fathers” and “children,” takes him home for treatment. “The restful companion” arrives at his home with the feeling of being arrested. The depressed state is aggravated by the fact that Kartashev, ready for any maternal reproaches, is completely confused before the feeling of physical disgust that he provoked in Aglaida Vasilievna. At the same time, Kartashev’s acute desire to live is combined with complete despair and “dull indifference” to everything that is happening and especially to his further fate. It is in this state that the author leaves his hero at the end of the third part of the tetralogy.