The terms of the bet are that the lawyer must live in isolation for fifteen years. At the end of that time, if he fulfills his bet of having no human contact for this period, the banker will pay him two million rubles.
The bet arises out of an argument on which is crueler, the death penalty or life imprisonment. A young lawyer argues that "to live anyhow is better than not at all." A banker contradicts him and bets the lawyer that he would not stay in solitary confinement for five years. The inflamed and boastful lawyer calls his bet, saying if the banker is in earnest, he will live, not five, but fifteen years in isolation.
During this long period of isolation, the lawyer may have books, musical instruments, any kind of food, wine, letters, and virtually anything else that he wants except human contact. So, at first, the lawyer is content. He reads books that are light in their subject matter, and he plays the piano frequently. In the second year, he becomes vociferous in his private conversations with himself, and he stops playing the piano. Then, in the sixth year, he decides to become an intellectual and studies languages and reads philosophy and history. In the tenth year, he reads only theological texts. Yet, though he has gained wisdom and knowledge, the lawyer finds his knowledge worthless because he has no one with whom to share anything.
Near the end of the term, the banker finds himself much poorer than he was when he made the bet. In his desperation he contemplates murdering the lawyer to avoid paying and being financially ruined. When he looks into the garden house where the lawyer is imprisoned, he finds him asleep. Breaking the seals on the door, the banker discovers a prematurely aged man asleep and the pessimistic letter of the lawyer, who has renounced the bet. After reading this letter, the banker returns to his house.
The next day, the watchman reports that the prisoner is gone; the banker retrieves the letter and hides it in his safe. Ironically, both men feel a contempt for their lives.