Javert, a police inspector, is Valjean's enemy who pursues him relentlessly after he escapes. He is not a "good guy" however. His kind of justice is to punish with vengeance.
Javert discovers Valjean's true identity only because Valjean confesses it to Javert. Another man, Champmathieu, is accused of being the escaped prisoner, Valjean, and will be executed if Valjean doesn't speak up. Valjean spends a long night trying to decide whether to save himself or an innocent man. His inner struggle describes why he decides to save Champmathieu.
To deliver himself up, to save this man stricken by so ghastly a mistake, to reassume his name, to become again from duty the convict Jean Valjean, that was really to achieve his resurrection, and to close forever the hell from whence he had emerged! to fall into it in appearance, was to emerge in reality! he must do that! all he had done was nothing, if he did not do that! all his life was useless, all his suffering was lost.
After Javert arrests him, Valjean escapes, and Javert begins his fanatical hunt for him.
Inspector Javert is the head of the police, whose lifelong goal is to catch the escaped criminal Jean Valjean. Valjean, who has taken on a new name and has found a new life, reveals who he really is to save another man who has been unjustly identified by Javert as being Valjean. As a result of this revelation, Javert arrests Valjean, who once again escapes. Valjean lives a life in hiding, until circumstances put him in a situation where he saves Javert's life. Javert, who has devoted his life to bringing Valjean to justice, cannot reconcile the fact that the man he has pursued has bravely risked his life to save his own. In despair, the Inspector drowns himself in the Seine River.