After an worker was caught in an accident, and Jean saves the man from being crushed by his cart. Javert then suspects that Jean Valjean is actually the mayor, and accidentally denounces him. The mayor forgives Javert for doing so, because Officer Javert then finds out that the supposed real Jean Valjean has been captured. Jean then goes to the trial of the accused man, and reveals his true identity. Jean then returns to his house, to find Fantine very ill. Before she dies, Fantine requests Jean to take care of her daughter, Cosette.
Javert then goes his house, but finds that Jean has escaped. He goes to the Thernadiers, the inntakers who were taking care of Cosette but actually abusing her, and rescues her. He and Cosette then go to Paris to start a new life. Ten years later, Cosette falls in love with Marius, a revolutionist, while living in a religious convent. Jean tries to find out what organization does Marius belong. When the revolt begins, Javert tries to arrest Valjean by kidnapping Cosette, who was with Marius. Marius then rids of his weapon and captures him. He brings Javert to the barricades as a prisoner to be executed.
Valjean then realizes how Marius loves Cosette so much, and decides to convince Marius to come back to Cosette. When Gavroche, a young boy allied with the revolutionists, gets killed by the French Army, Valjean then convinces Marius that he himself should execute Javert, and takes him to a back alley. But instead of killing him, he sets him free. Marius then gets shot, and is rescued by Valjean. Valjean along with Marius go down a sewer to avoid being captured by Javert.
After a while, Javert finally captures Valjean, but agrees to spare Marius. Valjean takes him back home, and says goodbye to Cosette, giving her Fantines necklace. When Valjean goes back to Officer Javert to be executed, Javert then sets him free, unable to kill a man who had done many crimes, yet had shown much goodness to him. He then shackles himself, says farewell to Valjean, and does suicide by throwing himself into the Seine. Jean Valjean then walks down the empty street, happy to be a free man.