The young idealist Dmitriy Olenin leaves Moscow, hoping to start a new life in the Caucasus. In the stanitsa, he slowly becomes enamored by the surroundings and despises his previous existence. He befriends the old Cossack Eroshka, who goes hunting with him and finds him a good fellow because of his propensity to drinking. During this time, young Cossack Luka kills a Chechen who is trying to come across the river towards the village to scout the Cossacks and in this way gains much respect. Olenin falls in love with the maid Maryanka, who is to be wed to Luka later in the story. He tries to stop this emotion and eventually convinces himself that he loves both Luka and Maryanka for their simplicity and decides that happiness can only come to a man who constantly gives to others with no thought of self-gratification.
He first gives an extra horse to Luka, who accepts the present yet doesn't trust Olenin on his motives. As time goes on, however, though he gains the respect of the local villagers, another Russian named Beletsky, who is still attached to the ways of Moscow, comes and partially corrupts Olenin's ideals and convinces him through his actions to attempt to win Maryanka's love. Olenin approaches her several times and Luka hears about this from a Cossack, and thus does not invite Olenin to the betrothal party. Olenin spends the night with Eroshka but soon decides that he will not give up on the girl and attempts to win her heart again. He eventually, in a moment of passion, asks her to marry him, which she says she will answer soon.
Luka, however, is severely wounded when he and a group of Cossacks go to confront a group of Chechens who are trying to attack the village, including the brother of the man he killed earlier. Though the Chechens lose after the Cossacks take a cart to block their bullets, the brother of the slain Chechen manages to shoot Luka in the belly when he is close by. As Luka seems to be dying and is being cared for by village people, Olenin approaches Maryanka to ask her to marry him; she angrily refuses. He realizes that "his first impression of this woman's inaccessibility had been perfectly correct." He asks his company commander to leave and join the staff. He says goodbye to Eroshka, who is the only villager who sees him off. Eroshka is emotional towards Olenin but after Olenin takes off and looks back, he sees that Eroshka has apparently already forgotten about him and has gotten back to normal life.