The story opens with the banker recalling a party fifteen years ago. The banker, the lawyer, and others are discussing capital punishment and which is more humane: the death penalty or life in prison. The banker claims that capital punishment (the death penalty) is more humane because it kills the man at once whereas life in prison "drags the life out of you" over many years. The lawyer disagrees. He says the death penalty and life in prison are both immoral but life in prison is preferable because some life is better than none.
The banker hypothetically bets the lawyer two million dollars/rubles that he could not stay in solitary confinement for five years. The lawyer inexplicably raises it to fifteen years for the same amount of money. They set the terms of the bet. The lawyer must remain in his prison for fifteen years. It is to be a lodge in the banker's garden. He is to have no contact with other people. He can not even hear a human voice, receive letters, or newspapers. He is allowed a musical instrument, any books he wants, and he can smoke and drink wine. His only contact with the outside world is through a small window through which he would receive food, books, and so forth. If any of these conditions are broken or if he leaves the lodge, the banker wins and keeps his two million.
The lawyer fluctuates between idleness, loneliness, and intense study. On the night before the final day, the banker considers killing the lawyer because giving up the two million will essentially bankrupt him. His wealth had decreased considerably over those fifteen years. The banker enters the lawyer's cell and finds a statement written by the lawyer who claims he will leave early, thus breaking the bet. The lawyer has become nihilistic. He now finds life to be meaningless and therefore the money is useless to him. He leaves early, breaking the bet.
Chekov once had a third section but eventually omitted it. In this section, the banker made it a habit of giving praise to the lawyer as a way of assuaging his guilt. The lawyer reappears one day and demands a large sum of money or he will commit suicide. The banker agrees and says that the lawyer wins the bet. Since Chekov omitted this part, readers have supposed that he was unsure how this story should end or what the story should mean. Chekov seems to be making a study of the psychology of the two men rather than suggesting some main point or moral to the story.