Spring 1924. Lev Glebovich Ganin lives in a Russian guesthouse in Berlin. In addition to Ganin, the mathematician Alexei Ivanovich Alferov, a man “with a thin beard and a brilliant puffy nose”, “an old Russian poet” Anton Sergeyevich Podtyagin, and Klara, “a full-bodied, all in black silk, very cozy young lady”, working as a typist and in love with, live in a guesthouse. Ganina, as well as the ballet dancers Colin and Gornotsvetov. “A special shade, mysterious mimicry” separates the latter from other boarders, but “speaking honestly, one cannot condemn the pigeon happiness of this harmless couple”.
Last year, upon arriving in Berlin, Ganin immediately found a job. He was a worker, and a waiter, and an extras. He has enough money left to leave Berlin, but for this he needs to break up with Lyudmila, whose relationship has been going on for three months and is tired of him. But how to break, Ganin does not know. His window opens onto the railroad track, and therefore, "the opportunity to leave is teasing obsessively." He announces to the mistress that he will leave on Saturday.
Ganin learns from Alferov that on Saturday his wife Mashenka arrives. Ganin leads Alferov to himself to show him photographs of his wife. Ganin learns his first love. From that moment on, he is completely immersed in the memories of this love, it seems to him that he was younger by exactly nine years. The next day, on Tuesday, Ganin announces to Ludmila that he loves another woman. Now he is free to recall how, nine years ago, when he was sixteen years old, he, recovering from typhoid fever in a summer estate near Voskresensk, created a female image for himself, which he met in reality in a month. Mashenka had a “chestnut braid in a black bow”, “Tatar burning eyes”, a dark-skinned face, a voice “mobile, burry, with unexpected chest sounds”. Masha was very cheerful, loved sweets. She lived in a country house in Voskresensk. Once with two friends, she climbed into the gazebo in the park. Ganin spoke to the girls, they agreed to go boating the next day. But Mashenka came alone. Every day they began to meet on the side of the river where an empty white manor stood on a hill.
When on a stormy black night, on the eve of leaving for St. Petersburg by the beginning of the school year, he last met with her at this place, Ganin saw that the shutters of one of the windows of the estate were ajar, and a human face was pressed against the glass from the inside. This was the watchman’s son. Ganin broke the glass and began to “hit with a stone fist on his wet face”.
The next day he went to Petersburg. Masha moved to Petersburg only in November. The "snow era of their love" began. It was difficult to meet, wandering in the cold for a long time was painful, so both remembered the summer. In the evenings, they talked for hours on the phone. All love requires privacy, and they did not have a shelter, their families did not know each other. At the beginning of the new year, Mashenka was taken to Moscow. And it is strange: this separation was a relief for Ganin.
In the summer, Masha returned. She called Ganin to the cottage and said that her dad would never want to rent a cottage in Voskresensk again and she now lives fifty miles from there. Ganin went to her bicycle. Arrived already in the dark. Mashenka was waiting for him at the gates of the park. “I am yours,” she said. “Do whatever you want with me.” But strange rustles were heard in the park. Mashenka was too docile and motionless. “It seems to me that someone is coming,” he said, and stood up.
He met with Mashenka a year later in a country train. She got off at the next station. They never saw each other again. During the war, Ganin and Mashenka several times exchanged gentle letters. He was in Yalta, where "a military struggle was being prepared", it was somewhere in Little Russia. Then they lost each other.
On Friday, Colin and Gornotsvetov, on the occasion of receiving an engagement, Klara’s birthday, Ganin’s departure and Podtyagin’s supposed departure to Paris, decide to hold a "celebration" to his niece. Ganin with Podtyagin goes to the police department to help him with a visa. When the long-awaited visa is received, Podtyagin accidentally leaves a passport on the tram. He has a heart attack.
The festive dinner is sad. Podtyagin again becomes ill. Ganin gives a drink to the already drunk Alferov and sends him to sleep, and he himself imagines how he will meet Masha at the station in the morning and take her away.
Having packed his things, Ganin says goodbye to the boarders sitting at the bedside of the dying Podtyagin and goes to the station. There is an hour left before Mashenka arrives. He sits down on a bench in the park near the station, where four days ago he recalled typhoid fever, the estate, and Masha's hunch. Gradually "with merciless clarity" Ganin realizes that his affair with Mashenka ended forever. “It lasted only four days, - these four days were perhaps the happiest times of his life.” The image of Mashenka remained with the dying poet in the "house of shadows." And there is no other Mashenka and cannot be. He is waiting for the moment when an express train coming from the north passes along the railway bridge. He takes a taxi, goes to another station and gets on a train going to the south-west of Germany.