Your question seems to be suggesting that the young lawyer deliberately left the lodge where he was imprisoned because he knew that the banker intended to kill him rather than pay him the two million rubles he would have won. That is a highly original suggestion, but I don't think there is any evidence to substantiate it. The story is told entirely from the banker's point of view, so we can't be sure what might be going on in the prisoner's mind. However, he leaves a long note for the banker in which he begins by saying:
"To-morrow at twelve o'clock I regain my freedom and the right to associate with other men, but before I leave this room and see the sunshine, I think it necessary to say a few words to you."
He obviously doesn't expect to be killed or to have anyone attempt to kill him. He is not fleeing to save his life. He does not suspect any foul play. He does not know what has been going on the the banker's life during these past fifteen years and probably assumes that the two million rubles is still a relatively inconsequently sum to the wealthy banker. In his note, which the banker keeps as evidence of his innocence and his victory, the lawyer explains why he has decided to leave his imprisonment voluntarily before the deadline and thereby lose the bet and the money.
"To prove to you in action how I despise all that you live by, I renounce the two million of which I once dreamed as of paradise and which now I despise. To deprive myself of the right to the money I shall go out from here five hours before the time fixed, and so break the compact ..."