In the exposition of the story, there is a dispute between a young lawyer and a banker about capital punishment that is to be settled by a bet between them that the young man can live imprisoned on the banker's estate solitary for fifteen years, proving that it is better to "live anyhow" rather than not at all, as he contends while the banker holds that the death penalty is "more moral and more humane than life punishment."
After the young lawyer has lived in solitary confinement for nearly fifteen years with only books and a piano for company, he despairs of life as worthless and bitter. He is an emaciated man bereft of any comfort; so, he decides to leave three days before the consummation of the bet, releasing the banker from the debt; however, before he slips out the window, he composes a letter telling the banker that he hates all that the banker represents and renounces the two million rubles.
This letter and the lawyer's disappearance are certainly not what has been expected by the banker or even readers. In addition, it is ironic that the banker himself feels no joy over not having to pay the two million even though he is unable to pay the sum, having failed in his investments.
When the banker had read this, he laid the page on the table, kissed the strange man on the head, and went out of the lodge, weeping. At no other time...had he felt so great a contempt for himself. When he got home, he lay on his bed, but his tears and emotion kept him for hours from sleeping.
Certainly, then, there is great situational irony at the end of Chekhov's story since the despair that both feel is not what they anticipated fifteen years ago.