Jean Valjean is an ex-convict who was imprisoned for stealing a loaf of bread. Upon his release, he finds that he is treated like an outcast everywhere he goes, until the Bishop Myriel helps him to create a new life for himself. He adopts the name Monsieur Madeleine, and becomes a successful factory owner. However, he is hunted by the dogged police officer Javert, who believes that no criminal can ever truly reform.
Fantine is an impoverished but beautiful young woman who falls in love with a pompous young student, who eventually abandons her shortly after she gives birth to their child. Fantine names this daughter Cosette, and leaves her in the care of the Thénardiers in order to find work. The Thénardiers treat Cosette cruelly, and charge Fantine high sums of money for the care of her daughter. After her illegitimate child is discovered, she loses her job at Valjean's factory and is forced to turn to prostitution.
Javert takes her into custody after she assaults a young man who shoves a snowball down her blouse. Valjean intervenes and brings Fantine to a hospital; she is deathly ill after the snowball incident. Valjean promises Fantine that he will take care of her daughter Cosette, but this task is interrupted when Valjean hears that a man named Champmathieu has been mistakenly identified as him, and faces life imprisonment as a recidivist convict. After much soul-searching, Valjean testifies in front of the court that he is actually Valjean. Fantine dies, and Valjean is imprisoned once again.
Valjean escapes prison after falling from a rope, and he rescues Cosette from the wicked Thénardiers. They start a new life in Paris that is soon interrupted by Javert, who has discovered that Valjean escaped from prison alive. The two take shelter in the Petit-Picpus convent, and Cosette grows into a young woman.
Marius is a wealthy young man who adores his grandfather Gillenormand. However, Gillenormand has cut off Marius from his father, Georges Pontmercy, because the two men disagree on politics. Marius thought his father abandoned him, but the friendly churchwarden Monsieur Mabeuf tells him the truth, and Marius begins to idolize his father (who has died). Eventually, this leads to a falling-out between Marius and Gillenormand, and Marius starts a new life. He becomes friends with the revolutionary ABC Society, and falls in love with Cosette, and beautiful young woman that he sees in the Luxembourg garden. Marius is unable to find this young woman again, and falls into despair.
However, the past catches up to them. The Thénardiers attempt to extort money from Valjean by kidnapping him, but Marius intervenes and saves him. The eldest Thénardier daughter, Éponine, has fallen in love with him. Marius has eyes only for Cosette, and the two establish a relationship when Marius leaves a notebook of love letters in her garden. Their romance is cut short when Valjean decides that he and Cosette must leave France and move to England, because of the social upheaval.
In despair, Marius joins an uprising against the government. He finds his friends from the ABC Society at a barricade, where they are doing battle against the police and the army. Javert has attempted to infiltrate their ranks as a spy, but he has been discovered and lashed to a pole. Éponine dies protecting Marius on the barricade.
Valjean, who has discovered Marius' love for Cosette, joins the group at the barricade. He volunteers to execute Javert, but then lets him go instead, much to Javert's bewilderment. Valjean returns just as the army is overwhelming the barricade. He seizes a gravely injured Marius and disappears down the sewers. Javert is waiting for Valjean at the exit, but rather than arresting him, he shows Valjean mercy and allows him to bring the wounded Marius to safety (Marius never learns the identity of the man who saved him). Disgusted and horrified at his lapse of duty, Javert commits suicide.
Marius recovers from his wounds and, with the blessing of Gillenormand and Valjean, marries Cosette. Valjean has confessed his criminal past to Marius, who is horrified that the man is a criminal. Marius and Cosette grow closer as Valjean and Cosette grow farther apart. Valjean's life loses its meaning without Cosette, and his health fades. However, Valjean's heroism is made clear to Marius when Thénardier unwittingly reveals to Marius that it was Valjean who saved him on the night the barricade fell. Marius and Cosette arrive in time to comfort Valjean on his deathbed and the old man dies in peace, with the satisfaction of a life well and righteously lived.