Jean Valjean, once a runaway thief, became a major of Ve go. He is a person of justice. Jean employs poor people to work in his fabric. He helps people, because he knows how it is to be poor. Jan Valjean is a republican.
He is not a person who wants everything just for himself. He sees France as a better society without dictators. According to him everybody deserves another chance. Javert, the police officer, who is after him, gets another chance.
Jean Valjean knew that he will be after him all the time, but he didn't kill him, because that is not the system he believes in. He believes in justice, and there is justice for everybody. Javert is a person who lives by rules. He believes in French monarchy. People have to live under rules. If they don't have the rules it is going to be a chaos.
He will do everything, just to satisfy the monarchy. He doesn't believe in things that Jean Valjean believes. They go in different directions. Javert doesn't believe that everybody deserves a second chance. Nobility can't interact with lower classes. People should suffer for their acts.
Javert doesn't see France as the republic. Javert is a man of rules. He couldn't let Jean live, because he was a criminal. His main goal was to catch Jean, and bring him to trial.
At the end of the movie he finally has caught Jean. Jean was able to kill him before, but he gave him a chance even he knew he is not going to leave him alone. Jean told that he doesn't have the right to kill him. Javert decides to let jean go and kills himself. He was a man of rules. One of them had to die.
He knew he would never stop if they both lived. Jean deserved to live because he let him live. Javert knew he had to do what is good for France. If he let Jean go, and not kill himself, he would betray his beliefs.
He would break the rule. A person without rules is not worth of living. He broke the rule, and he had to die.