Jean Valjean, a man arrested for stealing bread nineteen years earlier, is released on account of Mrs. Herberst, Valjean’s wife. When no one is willing to allow a convict to stay the night, Bishop Myriel kindly welcomes him into his home. Valjean explains to Myriel that sleeping in a real bed will make him a new man. In the night, Valjean, interrupted by Myriel while stealing his silverware, strikes him and flees. When the police arrest Valjean for stealing and drag him back to Myriel, Myriel tells them that the silverware was a gift and scolds Valjean for forgetting to take his candlesticks as well. Myriel then reminds Valjean that he is to become a new man.
Nine years later, Valjean is now a wealthy industrialist and a mayor. Fantine, a single mother working at one of Valjean’s factories, is fired when her manager learns she has had a daughter out of wedlock. However, Valjean is preoccupied with the arrival of Inspector Javert, who previously served as a guard at the prison in which Valjean was held. Fantine, in desperate need of money to pay the extortionate demands of Mr. and Mrs. Thénardier for looking after her daughter Cosette, turns to prostitution. Javert starts to suspect that the Mayor and Valjean are the same person. Fantine is attacked by some customers, and when she retaliates, Javert beats and arrests her, planning on sending her to prison. Citing his authority to do so as mayor, Valjean insists on her release and she is let go.
Valjean nurses Fantine back to health, and promises her that she will have her daughter back. However, the Thénardiers continue to extort more money from Valjean and Fantine on the pretence of Fantine’s daughter being ill. Later, Valjean receives word that another man is mistaken as being him and is about to be arrested. Valjean arrives at court where the man is being tried and reveals his identity that he is the real Valjean. Valjean then returns home and finds Fantine at death’s door. Before she dies, Valjean promises Fantine that he will raise her daughter as his own. Javert arrives at Valjean’s home to arrest both him and Fantine, but Fantine dies when Javert tells her she will be sent to prison. Angry and grieving, Valjean fights Javert and knocks him out, then flees the town. Valjean eventually finds and rescues Cosette from the Thénardiers, the corrupt innkeepers who were supposed to care for her, but are actually forcing her to be their servant. They care little for the girl, seeing her merely as a way to bring in money (going so far as to offer up Cosette as a child prostitute to the as-yet unrevealed Valjean). Both Valjean and Cosette finally make it to Paris where they start a new life together as father and daughter, cloistered within a religious convent.
Ten years later, they leave the convent, and Cosette, now nineteen years old, falls deeply in love with a revolutionist, Marius. Meanwhile, Javert is now undercover as an insurrectionist, trying to undermine the organization to which Marius belongs. During an attempt to finally arrest Valjean, Javert is captured by Marius and is brought to the barricades as a prisoner to be executed. Valjean journeys to the barricades himself when he learns how much Cosette and Marius love each other, intending to persuade Marius to return to Cosette. When the soldiers shoot and kill Gavroche, a young boy allied with the revolutionists, Valjean uses his influence with Marius to have Javert turned over to him, so that he himself can execute him. Valjean takes Javert to a back alley, but instead of killing him, sets him free. Marius gets shot and Valjean takes him down a sewer to bring him to safety. Javert catches them, but agrees to spare Marius. Valjean takes Marius back to his home, also saying goodbye to Cosette. When Valjean returns to Javert, Javert tells him that he is now unable to reconcile Valjean’s criminal past with his current lawful existence and the great kindness, generosity, and goodness that Valjean has shown. Stating, “It’s a pity the rules don’t allow me to be merciful,” Javert finally sets Valjean free, shackles himself, adding “I’ve tried to live my life without breaking a single rule,” and throws himself into the Seine thus taking his own life. Valjean walks down the empty street, finally a free man, with a smile on his face.