In 1815, French prisoner Jean Valjean is released from the Bagne of Toulon after serving nineteen years for stealing a loaf of bread for his sister’s son. His paroled status prevents him from finding work or accommodation, but he is sheltered by the kindly Bishop of Digne. Stealing his silverware, Valjean is captured by police, but the Bishop claims he gave Valjean the silver, telling him to use it to do something worthwhile with his life. Moved, Valjean breaks his parole to start a new life.
Eight years later, Valjean is a respected factory owner and mayor of Montreuil, Pas-de-Calais. He is shocked when Javert, formerly a Toulon prison guard, arrives as his new chief of police. Javert suspects Valjean’s real identity when he rescues a worker trapped under a cart. One of Valjean’s workers, Fantine, is dismissed by the factory foreman upon learning she has an illegitimate daughter Cosette, who lives with greedy innkeepers, the Thénardiers, to whom Fantine sends her earnings.
To support her daughter, Fantine sells her hair and teeth, and becomes a prostitute. Javert arrests her when she attacks an abusive customer, but Valjean rescues her and takes her to the hospital. Learning that a man has been wrongly identified as him, Valjean reveals his identity to the court before returning to the dying Fantine, promising to care for Cosette. Javert arrives to arrest Valjean but he escapes. Paying Fantine’s debts to the Thénardiers, Valjean flees from Javert with Cosette. They hide in a convent, aided by the worker Valjean rescued.
Nine years later, Valjean has become a philanthropist to the poor in Paris. General Lamarque, the only government official sympathetic to the poor, dies, and revolutionists called the Friends of the ABC plot against the monarchy. Marius Pontmercy, a member of the Friends, falls in love with Cosette and asks Éponine, the Thénardiers’ daughter, to help find her. He and Cosette meet and confess their love; Éponine, also in love with Marius, is heartbroken.
Thénardier attempts to rob Valjean’s house, but is stopped by Éponine. Valjean, afraid Javert is near, plans to flee to England with Cosette. She leaves Marius a letter, which Éponine hides from him. During Lamarque’s funeral procession, the revolt begins and barricades are built across Paris. Javert poses as an ally to spy on the rebels, but the street urchin Gavroche exposes him as a policeman. During the first skirmish against the soldiers, Éponine takes a bullet for Marius and dies in his arms, giving him Cosette’s letter and confessing her love. Marius’ answer to Cosette is intercepted by Valjean, who joins the revolution to guard Marius.
Valjean offers to execute Javert but releases him instead, faking the policeman’s death. By dawn, the soldiers storm the barricade and kill everyone except Marius and Valjean, who escape into the sewers. Thénardier comes across Valjean and the unconscious Marius, stealing the latter’s ring before pointing a way out. Valjean finds Javert waiting for him, but ignores his threats. Javert, morally confused by the mercy of his nemesis, commits suicide by throwing himself in the Seine. Marius recovers, traumatized by the death of his friends.
Marius and Cosette are reunited but Valjean, concerned his presence would threaten their happiness, makes plans to leave and reveals his story to Marius, who promises to remain silent. Cosette and Marius marry, but the Thénardiers crash the wedding reception to blackmail Marius. Thénardier claims that he witnessed Valjean carrying a murdered corpse and shows the stolen ring, which Marius recognises as his own. Realizing that Valjean saved him that night, Marius forces Thénardier to reveal where Valjean is before leaving with Cosette, and the Thénardiers are thrown out of the wedding. At the convent, Cosette and Marius find the dying Valjean, who gives them letters of confession before dying peacefully, and his spirit is guided by the spirits of Fantine and the Bishop to join Eponine, Gavroche, and the Friends of the ABC in the afterlife.