Like many of Dostoevsky's stories, "White Nights" is told in first person by a nameless narrator who lives alone in a city and suffers from loneliness and the inability to stop thinking. The character is an archetype of a perpetual dreamer. He lives his life in his own mind, imagining that an old man he always passes but never talks to or houses are his friends. The short story is divided into six sections:
- First Night
The story opens with a quotation by Ivan Turgenev
- "And was it his destined part
- Only one moment in his life
- To be close to your heart?
- Or was he fated from the start
- to live for just one fleeting instant,
- within the purlieus of your heart."
The narrator describes his experience walking in the streets of St. Petersburg. He loves the city at night time during which he feels comfortable in the city. He no longer feels comfortable during the day because all the people he was used to seeing were not there. He drew his emotions from there. If they were happy, he was happy. If they were despondent, he was despondent. He felt alone when seeing new faces. The main character also knew the houses. As he strolled down the streets they would talk to him and tell him how they were being renovated or painted a new color or being torn down. The main character lives alone in a small apartment in Saint Petersburg with only his older, non-social maid Matrona to keep him company.
He tells the story of his relationship with a young girl called Nastenka (a diminutive of the name Anastasia). He first sees her standing against a railing while crying. He becomes concerned and considers asking what's wrong but eventually steels himself to continue walking. There is something special about her and he is very curious. When he hears her scream, he intervenes and saves her from a man who is harassing her.
The main character feels timid and begins shaking while she holds his arm. He explains that he is alone, that he has never known a woman, so he is timid. Nastenka reassures him that ladies like timidity and she likes it, too. He tells her how he spends every minute of every day dreaming about a girl that would just say two words to him, who will not repulse him or ridicule him as he approached. He explains how he thinks of talking to a random girl timidly, respectfully, passionately; telling her that he is dying in solitude and how he has no chance of making a mark on any girl. He tells her that it is a girl's duty not to rudely reject or mock one as timid and luckless as he is.
As they reach Nastenka's door, the main character asks if he will ever see her again. Before she can answer, he adds that he will be at the spot they met tomorrow anyway just so he can relive this one happy moment in his lonely life. She agrees, stating she can't forbid him not to come and she has to be there anyway. The girl would tell him her story and be with him, provided that it does not lead into romance. She too is as lonely as the narrator.
- Second Night
On their second meeting, Nastenka introduces herself to him and the two become friends by relating to each other. She exclaims that she has been thinking and knows nothing of him. He responds that he has no history because he has spent his life utterly alone. When she presses him to continue on the matter, the term "dreamer" pops up as the main character explains that he is of that archetype. The main character defines " 'The dreamer' - if you want an exact definition - is not a human being, but a creature of an intermediate sort."
In a precursor to a similar speech in Notes from Underground, the narrator gives a verbose speech about his longing for companionship leading Nastenka to comment, "...you talk as if you were reading from a book".
He begins to tell his story in third person as he call himself "the hero." This "hero" is happy the hour when all work ends and people walk about. He references Vasily Zhukovsky as he mentions "The Goddess of Fancy". He dreams of everything in this time; from befriending poets to having a place in the winter with a girl by his side. He states that the dreariness of everyday life kills people while he can make his life as he wishes it to be at any time in his dreams.
At the end of his moving speech, Nastenka sympathetically assures him that she would be his friend.
- Nastenka's Story
The third part is Nastenka relating her life story to the narrator. She lived with her strict grandmother who gave her a largely sheltered upbringing. Her grandmother's pension being too small, they rent out their house to gain income. When their early lodger dies, he's replaced by a younger man closer to Nastenka's age much to her grandmother's distaste. The young man begins a silent courtship with Nastenka giving her a book often so that she may develop a reading habit. She takes a liking to the novels of Sir Walter Scott and Aleksandr Pushkinas a result. One day, the young man invites her and her grandmother to the theater running The Barber of Seville.
Upon the night that the young lodger is about to leave Petersburg for Moscow, Nastenka escapes her grandmother and urges him to marry her. He refuses immediate marriage, stating that he does not have money to support them but he assures her that he would return for her exactly a year later. Nastenka finishes her story at the end of this, noting that a year has gone and he hasn't sent her a single letter.
- Third Night
The narrator gradually realizes that despite his assurance that their friendship would remain platonic, he has inevitably fallen in love with her. But he nevertheless helps her by writing and posting a letter to her lover and hides away his feelings for her. They await his reply for the letter or his appearance; but, gradually, Nastenka grows restless at his absence. She takes comfort in the narrator's friendship. Unaware of the depth of his feelings for her, she states that "I love you so, because you haven't fallen in love with me." The narrator, despairing due to the unrequited nature of his love for her, notes that he has now begun to feel alienated from her as well.
- Fourth Night
Nastenka despairs at the absence of her lover and his reply even though she knows that he's in St. Petersburg. The narrator continues to comfort her to which she's extremely grateful, leading the narrator to break his resolve and confess his love for her. Nastenka is disoriented at first, and the narrator, realizing that they can no longer continue to be friends in the manner that they did before, insists on never seeing her again; however, she urges him to stay. They take a walk where Nastenka states that maybe their relationship might become romantic some day, but she obviously wants his friendship in her life. The narrator becomes hopeful at this prospect when during their walk, they pass by a young man who stops and calls after them. He turns out to be Nastenka's lover into whose arms she jumps. She returns briefly to kiss the narrator but journeys into the night with her love leaving him alone and broken hearted.
"My nights came to an end with a morning. The weather was dreadful. It was pouring, and the rain kept beating dismally against my windowpanes".
The final section is a brief afterword that relates a letter which Nastenka sends him apologizing for hurting him and insisting that she would always be thankful for his companionship. She also mentions that she would be married within a week and hoped that he would come. The narrator breaks into tears upon reading the letter. Matryona, his maid, interrupts his thoughts by telling him she's finished cleaning the cobwebs. The narrator notes that though he'd never considered Matryona to be an old woman, she looked far older to him then than she ever did before, and briefly wonders if his own future is to be without companionship and love. He however refuses to despair.