Fifteen years before the story opens, the banker was holding a party for a large group of men.
There had been many clever men there, and there had been interesting conversations. Among other things they had talked of capital punishment.
Some of the men considered capital punishment inhumane and argued that the maximum punishment for any crime should be life imprisonment. The author, Anton Chekhov, does not state that there was much drinking being done, but it is probable that, given the time period and the country and the fact that it was an all-male gathering, a lot of wine and vodka was being consumed and the air was thick with cigar smoke.
The banker and a young lawyer became engaged in a heated argument. The lawyer contended that life imprisonment was preferable to the death penalty, while the banker contended that a quick, humane execution was preferable to a long term in a bleak prison. Most of the conversation is not contained in the opening part of the story. Somehow or other the lawyer must have gotten around to arguing that even life in solitary confinement was preferable to execution.
The banker, who must have been intoxicated, struck the table with his fist and shouted:
"It's not true. I'll bet you two million you wouldn't stay in solitary confinement for five years."
"If you mean that in earnest," said the young men, "I'll take the bet, but I would stay not five but fifteen years."
"Fifteen? Done!" said the banker. "Gentlemen, I stake two million!"
All of this and much more is told in flashbacks representing the banker's memories of the occasion and of what has transpired during the intervening fifteen years. The bet seems ridiculous for several reasons. One is that the banker is risking two million rubles but has nothing to gain if he wins. Another reason is that such a bet seems positively illegal, or at least immoral. Chekhov specifies that the lawyer is free to leave his confinement in the lodge on the banker's estate at any time. Of course, he forfeits the two million rubles if he does so before the end of the fifteen years.
The lawyer is very well treated for a prisoner in solitary confinement. He is provided with a comfortable room, a piano, good meals, with wine if he desires, and all the books he asks for. The banker doesn't expect him to endure solitary confinement for more than three or four years; but the lawyer sticks it out year after year as a matter of stubborn pride. The reader may wonder whether he would be able to tolerate such a life himself. There is a plus side to the confinement. At least the lawyer doesn't have to work or worry about earning money. He can improve his mind with reading, which he does. His meals are all provided by a servant. And, of course, he can look forward to receiving two million rubles.
Chekhov was one of the world's great short-story writers. He did not usually have surprise endings to his stories. A typical Chekhov short story ends without any resolution or epiphany. A good example of the Chekhovian story is his "The Lady with the Pet Dog." But "The Bet" ends with a big surprise. The lawyer has changed so much over the years that he has come to despise money and material things. He leaves a note for the banker saying that he intends to forfeit the bet only five hours before the deadline by walking out the door. He may have unwittingly saved his own life, because it appears that the banker was seriously planning to kill him rather than pay him two million rubles.