The story opens with a banker pacing through his house, upset about a bet he made at a party fifteen years prior. At that party, the guests began debating whether the death penalty or life in prison was the worse punishment. The banker believes the death penalty is at least a quick death, whereas a life without liberty is a slow death. One of the guests, a young lawyer, steadfastly believes that having any life at all is better than being killed. The banker bets the lawyer two million rubles he wouldn’t last five years in prison. The lawyer ups the time to fifteen years.
The two men set parameters for the bet. The lawyer will stay in a garden-wing of the banker’s house without any company. He is allowed food, wine, and tobacco. He can have as many books as he wants and can play music, but he can only communicate with the outside world by letters slipped through a small window. With all this agreed, the lawyer begins his captivity in a small lodge in the banker’s garden. The lawyer at first devotes his time to music and novels. He eschews wine and tobacco. In later years, he asks for wine and stops reading. He then begins to study languages. At one point he asks for the banker to check his writing in six languages to see if he’s succeeded in mastering them. The banker signals that native speakers of those languages found no errors in his writing by having a gun shot off in the garden. Next, the lawyer turns his study to the New Testament, then theology, science, and philosophy. Despite these strange whims, he does not ask to be let out during the entire fifteen years.
In the meantime, the banker has lost his fortune. The two million rubles he could have easily spared fifteen years prior will now ruin him financially. It is the eve of the end of the bet, and the banker decides he must kill the lawyer in order to avoid paying out. However, when he enters the lawyer’s cell, he finds the lawyer asleep over a note he has been writing. The note offers insight into the lawyer’s emotional journey through the course of his captivity. Having devoted fifteen years to living life vicariously through books and study, the lawyer has determined that the material pleasures of life are fleeting and meaningless. Only heaven is real and matters. As such, he decides he will leave the prison before the end of the debt, releasing the banker from payment. Touched, the banker kisses his cheek and leaves him be. The next morning, the watchman alerts the banker that the lawyer is nowhere to be found. The banker takes the lawyer’s note and hides it in a safe to avoid rumors.