“Javert had been born in prison, of a fortune-teller, whose husband was in the galleys. As he grew up, he thought that he was outside the pale of society, and he despaired of ever re-entering it. He observed that society unpardoningly excludes two classes of men,—those who attack it and those who guard it; he had no choice except between these two classes; at the same time, he was conscious of an indescribable foundation of rigidity, regularity, and probity, complicated with an inexpressible hatred for the race of bohemians whence he was sprung.”

Part of what motivates Javert and the uncompromising way he upholds the law is a sense of personal shame; he is the son of criminals, born in a prison, and therefore not so different from the criminals he pursues. He possesses an “inexpressible hatred” for “bohemians,” but they represent his origin; they are “the race” from “whence he was sprung.” Because of this, Javert considers himself an outsider, and believes there are only two ways forward for outsiders: they can either “attack” society, or “guard it.” He can either be a criminal or an officer of the law, and so he chooses the latter.

“This man was composed of two very simple and two very good sentiments, comparatively; but he rendered them almost bad, by dint of exaggerating them,—respect for authority, hatred of rebellion; and in his eyes, murder, robbery, all crimes, are only forms of rebellion.”

During Javert’s introduction in “Fantine,” Book 5, Chapter 5, the narrator makes it clear that he sees things purely in black and white, and is ruled by this false dichotomy. To Javert, there are only two types of people: those who follow and respect the law, or “authority,” and those who don’t. He despises “rebellion,” and considers all crimes essentially equal, and equally worthy of punishment. This disposition is what motivates Javert to hunt Valjean throughout the novel. The narrator characterizes Javert as someone who is well-intentioned, in his respect for the law, but misguided in the pitiless, relentless way he goes about upholding it. As has been established by Valjean’s character, right and wrong are not nearly as simple as Javert has made them out to be; thus, his views, which fail to account for certain gray areas inherent in the wider human condition, are reductive.

“His supreme anguish was the loss of certainty. He felt that he had been uprooted. The code was no longer anything more than a stump in his hand. He had to deal with scruples of an unknown species. There had taken place within him a sentimental revelation entirely distinct from legal affirmation, his only standard of measurement hitherto. To remain in his former uprightness did not suffice. A whole order of unexpected facts had cropped up and subjugated him…He perceived amid the shadows the terrible rising of an unknown moral sun; it horrified and dazzled him.”

In “Jean Valjean,” Book 4, Javert struggles to reconcile his unwavering commitment to the law with the fact that Valjean, the man he has so desperately been seeking to arrest, has just spared his life. Javert’s conviction that the law is sacred and anyone who flouts the law is evil has been his primary driving force. He is a man of absolutes, and the sudden realization that a person can be both a criminal and a good man shakes him to his core. This “loss of certainty” represents the loss of the foundation on which he has built his entire life. Because Valjean is a criminal, Javert must arrest him; but because Valjean is also a good man, Javert can’t arrest him, lest he bring dishonor upon himself. In the end, the disintegration of his understanding of morality, “his only standard of measurement hitherto,” prompts Javert to commit suicide in order to resolve his inner crisis.