Huge incoherent rambling coming, I sincerely hope it makes sense. Also disclaimer, I read "Javert Derailed" 14 years ago. I may miss the mark somewhere, I hope not completely.
What I find so fascinating about Javert is how idealized he is. Despite my occasional Javert hating spree, I can't deny that the guy is actually an extremely, outrageously idealized version of a police officer. There are in fact no cops like Javert, not then, not now. Since the legal system is different today than in 19th century France, I guess you may find a more ideologically aware cop (I doubt it but let's just say). But I'm not talking about ideology, I'm talking about idiosyncrasy. Do you know many cops that are, personality wise, incorruptible, perfect, by the book, completely and blindly devoted to their job, never seeking personal gain? Cops who kill themselves because they made a mistake? Yeah you'll tell me that Javert is a bootlicker and a class traitor and his main motivation was to be accepted by his superiors so that counts as seeking personal gain. That's not exactly correct though. He is a bootlicker and a class traitor and he desperately wants to be accepted by his superiors *but* all of that manifests as an almost spiritual need for him. It's an idea he has for himself and the world and he wants to fit into that idea. Javert's bootlicking is a mere consequence of his particular worldview and *not* a means to an end, which is what bootlicking usually is. He's not desperate for the approval of his superiors in order to, let's say, ensure his financial stability or reinforce his social status. In fact he has no real consideration of either of those things. He literally asked for his removal when he made a mistake and then he killed himself. There are literally no cops like him.
And this is what fascinates me. Hugo could have easily given us a basic vile corrupted opportunistic cop. After all the system breeds those, we are all familiar with the type, and it existed at that time period as well, obviously (at the image of let's say, Fouché). Instead, Hugo went for a cop whose narrative mirror, if I'm being honest, is probably the nuns in Cosette's monastery. Hugo went to great lengths to make sure that we attribute Javert's evil deeds exclusively to the system that he represents, and not to any particular character flaw or weakness that would interfere with his duty, aka a flaw that is particular to Javert. Not to corruption, not to greed, not to vanity, not to selfishness, not to irresponsibility, not to incompetence. Javert has none of that.
He is perfect at his job. He is incorruptible. He is infallible. He is respectful. He has swallowed down the entire penal code. He knows all the articles by heart. He respects the nuns (very important for the time period!). He is sincere. He is humble. He has integrity. He is disinterested. He's god-fearing, he's catholic kink personified. He's a royalist. He is literally exemplary. And he STILL.SUCKS.ASS. Because it's the legal system that sucks ass. If this is your perfect cop, then there's something seriously wrong with the way this entire thing operates. And Hugo presents the most idealized, the most flawless example of a cop that is so absolutely perfect and so devoid of any real, relatable, human vice that he cannot be dissociated from the system that he represents, not at all, not even slightly. It's not that he literally doesn't have flaws. He does, he's an asshole, that's his entire premise. But Javert is not just another asshole cop. Javert is the Law, and his flaws are the flaws of the Law and his crimes are the crimes of the Law. He's exactly as he should be according to the legal system he personifies, and if he's an asshole, that means that the legal system needs to change.
Javert becomes a person on his own only when he distances himself from the Law and that happens once, at the end of the book. It is when he makes exactly one autonomous decision in his life, as Javert the person, not Javert the police officer. And he makes the autonomous decision to violate the Law, because he considered that the Law is wrong. And then he kills himself because that cannot be, that's how absolutely perfect he is. And what other option did he have?
In fact he couldn't just live and redeem himself by asking for his removal. First of all his redemption is irrelevant to him. Second of all, his removal would be a solution if he had just made a mistake. Which is why he had asked for his removal when he thought he had wrongfully denounced a Mayor. That one was Javert's mistake, he had failed the Law then. The ideal was intact, he just thought he didn't live up to it anymore. Of course he later realized he was infallible and that he was right to suspect Madeleine. And he is infallible this time as well. He persecuted a criminal. He did his job. It is precisely by being unimpeachable in the eyes of the law that he realized he fucked up, when confronted with an Ideal that is higher than the Law. He didn't fail the Law now. He just decided the Law is a bunch of shit and he consciously chose not to follow it. Asking for a dismissal would be logically absurd in this context.
Resigning isn't an option either. How could he resign? Javert could be dismissed as a punishment for a mistake, and that is already excluded. But resign? As in, consciously deciding that he doesn't want to be associated with the Law anymore? But Javert is the Law. He can quit it only as a punishment, not as an autonomous decision of defiance.
He could keep his position and try to help by becoming a good cop, a better cop. But he can't! There is literally no cop that is better than him, there can be no cop that is morally superior to him, not in this legal system, not in this society. He did everything right and he still fucked up because it's the whole thing that is rotten from the source, the whole thing has to change.
Javert the person finally distanced himself from Javert the Inspector and realized that being immaculate was a flaw, and the logical absurdity of it all led to his death . His suicide is not an individual act of cowardice, nor is it a dramatic finale to complete a formulaic redemption arc. It has neither the ambition nor the glamour. It is merely the conclusion of a very simple deductive reasoning performed with excellent precision in death, in line with Javert's general predisposition in life.
I find that really amazing.