The first most important moment in which religion influenced Jean Valjean's life relates to the Bishop of Digne's mercy and generosity. When Jean Valjean was finally released from prison after 19 years for stealing a loaf of bread for his seven starving nephews and nieces, he found that every place he went to in order to find food and lodging turned him out when they learned that he was an ex-convict. At one point he even tried to sleep in what turned out to be a dog's house but was turned out by the growling dog; he then declared in despair, "I am not even a dog!" (Vol. 1, Bk. 2, Ch. 1). The Bishop of Digne was the only one willing to accept him into his home, giving him dinner and a bed to sleep in. Not only that, he fed him using his best silver. Sadly, Valjean's primitive survival instincts drove him to steal the silver he had been presented with. When the police spied him with the silver, they returned him to the Bishop's home who said that Valjean had not stolen the silver, that it was a gift. He even asked Valjean why he had forgotten the candlesticks that he could "certainly get two hundred francs" for. The Bishop was doing two things by treating Valjean this way: 1) He was showing Valjean mercy for the first time in poor Valjean's life; 2) He was treating Valjean with compassion and giving him essential money he needed so that he can start a new life without being further suppressed by poverty and the law. As the Bishop of Digne phrases it, "It is your soul that I buy from you; I withdraw it from black thoughts and the spirit of perdition, and I give it to God" (Bk. 2, Ch. 12). The Bishop's mercy did indeed have a very redeeming effect on Valjean. After this moment, he became a new man, started his own factory, and dedicated his life towards showing generosity and compassion towards all.
Valjean has a second influential religious moment when he learns that a man named Champmathieu has been arrested and is being put on trial because the authorities have mistaken him for Jean Valjean. This put Valjean in quite a moral quandary. On the one hand, he is at peace for the first time in his life. He has become a completely changed man, dedicated to God and virtue. If he turns himself in by confessing himself to be Jean Valjean, he would lose everything he worked so hard for, including his freedom. However, he knows that, on the other hand, he cannot in good moral conscience have a man sentenced to prison for his own mistaken identity. As Hugo phrases it, after his encounter with God and the Bishop, Valjean had two thoughts, "to conceal his name and to sanctify his life; to escape men and to return to God" (Vol. 1, Bk. 7, Ch. 3). At this moment, his two fears collided, and he became forced to sacrifice his security and his identity for the sake of preserving his sanctity with God, making this second moment a very critical religious experience as well.