In a county town in a small hospital wing there is ward number 6 for the mentally ill. There "it stinks of sour cabbage, a wicked burnout, bedbugs and ammonia, and this stink in the first minute makes you feel as if you are entering a menagerie." Five people live in the ward. The first is "a thin tradesman with a red shiny mustache and with tearful eyes." Apparently, he is sick with consumption and is sad and sighs all day. The second is Moses, a funny little fool, "crazy about twenty years ago when his hat shop burned down." He alone is allowed to leave the ward and go to the city to fight, but all that he brings is selected by the watchman Nikita (he is one of those people who adore everything in order, and therefore mercilessly beats the sick). Moyseyka loves to serve everyone. In this, he imitates the third inhabitant, the only "of the noble" - the former bailiff Ivan Dmitrievich Gromov. He is from the family of a well-to-do official who, from a certain moment, began to pursue misfortunes. First, the eldest son, Sergei, died. Then he himself was put on trial for fraud and embezzlement and soon died in a prison hospital. The youngest son Ivan was left with his mother without funds. He hardly learned and got a position. But suddenly he was sick with a persecution mania and ended up in ward No. 6. The fourth inhabitant was a “fat man, almost round man with a dull, completely meaningless face.” It seems that he has lost the ability to think and feel; he does not react even when Nikita beats him brutally. The fifth and last inhabitant is “a thin blond with a kind, but somewhat crafty face.” He has megalomania, but of a strange quality. From time to time, he informs his neighbors that he received “Stanislav the second degree with a star” or some very rare order like the Swedish “Polar Star”, but speaks modestly, as if wondering himself.
After describing the patients, the author introduces us to Dr. Andrei Yefimich Ragin. In his early youth, he dreamed of being a priest, but his father, a doctor of medicine and a surgeon, forced him to become a physician. His appearance is “heavy, rude, peasant,” but his manners are soft, insinuating, and his voice is thin. When he took office, the “charitable institution” was in terrible condition. Terrible poverty, unsanitary conditions. Ragin was indifferent to this. He is a smart and honest person, but he does not have the will and faith in his right to change his life for the better. At first he worked very hard, but soon became bored and realized that in such conditions it was pointless to treat patients. “Yes, and why stop people from dying if death is the normal and legal end of everyone?” From these considerations, Ragin abandoned affairs and began to go to the hospital not every day. He developed his own way of life. After a little work, more for the sake of view, he goes home and reads. Every half hour, he drinks a glass of vodka and bites with pickled cucumber or a soaked apple. Then he dines and drinks beer. By evening, the postmaster Mikhail Averyanych, a former rich but ruined landowner, usually arrives. He respects the doctor, and despises other inhabitants. The doctor and the postmaster make senseless conversations and complain about fate. When the guest leaves, Ragin continues to read. He reads everything in a row, giving half his salary for books, but most of all he loves philosophy and history. Reading, he feels happy.
Once Ragin decided to visit Ward No. 6. There he meets Gromov, talks with him and soon gets drawn into these conversations, often visits Gromov and finds strange pleasure in conversations with him. They are arguing. The doctor takes the position of the Greek Stoics and preaches contempt for life’s sufferings, while Gromov dreams of ending his suffering, calls the doctor’s philosophy laziness and “sleepy idiot”. Nevertheless, they are drawn to each other, and this does not go unnoticed by the rest. Soon, the hospital begins to fumble about the doctor’s visits. Then he is invited to an explanation in the city council. This also happens because he has a competitor, assistant Evgeny Fedorych Khobotov, an envious person who dreams of taking Ragin's place. Formally, the conversation is about the improvement of the hospital, but in fact, officials are trying to find out if the doctor is crazy. Ragin realizes this and gets angry.
On the same day, the postmaster offers him to go together to unwind in Moscow, St. Petersburg and Warsaw, and Ragin understands that this is also due to rumors of his mental illness. Finally, he is directly offered to “rest,” that is, to resign. He accepts this indifferently and travels to Moscow with Mikhail Averyanich. On the way, the postmaster bothers him with his conversations, greed, gluttony; he loses money to Ragin’s cards, and they return home before they reach Warsaw.
At home, everyone again begins to bother Ragin with his imaginary craziness. Finally, he does not stand up and drives out of his apartment out of Khobotov and the postmaster. He becomes ashamed, and he goes to apologize to the postmaster. He persuades the doctor to go to the hospital. In the end, they put him there in a trick: Khobotov invites him to ward No. 6, allegedly for a consultation, then goes out allegedly for a stethoscope and does not return. The doctor becomes "sick." First, he tries to somehow leave the chamber, Nikita does not let him in, they start a riot with Gromov, and Nikita hits Ragin in the face. The doctor understands that he will never leave the room. This plunges him into a state of complete hopelessness, and soon he dies from an apoplexy blow. Only Mikhail Averyanych and Daryushka, his former servant, were at the funeral.