The convict Jean Valjean is released from a French prison after serving nineteen years for stealing a loaf of bread and for subsequent attempts to escape from prison. When Valjean arrives at the town of Digne, no one is willing to give him shelter because he is an ex-convict. Desperate, Valjean knocks on the door of M. Myriel, the kindly bishop of Digne. Myriel treats Valjean with kindness, and Valjean repays the bishop by stealing his silverware. When the police arrest Valjean, Myriel covers for him, claiming that the silverware was a gift. The authorities release Valjean and Myriel makes him promise to become an honest man. Eager to fulfill his promise, Valjean masks his identity and enters the town of Montreuil-sur-mer. Under the assumed name of Madeleine, Valjean invents an ingenious manufacturing process that brings the town prosperity. He eventually becomes the town’s mayor.
Fantine, a young woman from Montreuil, lives in Paris. She falls in love with Tholomyès, a wealthy student who gets her pregnant and then abandons her. Fantine returns to her home village with her daughter, Cosette. On the way to Montreuil, however, Fantine realizes that she will never be able to find work if the townspeople know that she has an illegitimate child. In the town of Montfermeil, she meets the Thénardiers, a family that runs the local inn. The Thénardiers agree to look after Cosette as long as Fantine sends them a monthly allowance.
In Montreuil, Fantine finds work in Madeleine’s factory. Fantine’s coworkers find out about Cosette, however, and Fantine is fired. The Thénardiers demand more money to support Cosette, and Fantine resorts to prostitution to make ends meet. One night, Javert, Montreuil’s police chief, arrests Fantine. She is to be sent to prison, but Madeleine intervenes. Fantine has fallen ill, and when she longs to see Cosette, Madeleine promises to send for her. First, however, he must contend with Javert, who has discovered Madeleine’s criminal past. Javert tells Madeleine that a man has been accused of being Jean Valjean, and Madeleine confesses his true identity. Javert shows up to arrest Valjean while Valjean is at Fantine’s bedside, and Fantine dies from the shock.
After a few years, Valjean escapes from prison and heads to Montfermeil, where he is able to buy Cosette from the Thénardiers. The Thénardiers turn out to be a family of scoundrels who abuse Cosette while spoiling their own two daughters, Eponine and Azelma. Valjean and Cosette move to a run-down part of Paris. Javert discovers their hideout, however, and they are forced to flee. They find refuge in a convent, where Cosette attends school and Valjean works as a gardener.
Marius Pontmercy is a young man who lives with his wealthy grandfather, M. Gillenormand. Because of political differences within the family, Marius has never met his father, Georges Pontmercy. After his father dies, however, Marius learns more about him and comes to admire his father’s democratic politics. Angry with his grandfather, Marius moves out of Gillenormand’s house and lives as a poor young law student. While in law school, Marius associates with a group of radical students, the Friends of the ABC, who are led by the charismatic Enjolras. One day, Marius sees Cosette at a public park. It is love at first sight, but the protective Valjean does his utmost to prevent Cosette and Marius from ever meeting. Their paths cross once again, however, when Valjean makes a charitable visit to Marius’s poor neighbors, the Jondrettes. The Jondrettes are in fact the Thénardiers, who have lost their inn and moved to Paris under an assumed name. After Valjean leaves, Thénardier announces a plan to rob Valjean when he returns. Alarmed, Marius alerts the local police inspector, who turns out to be Javert. The ambush is foiled and the Thénardiers are arrested, but Valjean escapes before Javert can identify him.
Thénardier’s daughter Eponine, who is in love with Marius, helps Marius discover Cosette’s whereabouts. Marius is finally able to make contact with Cosette, and the two declare their love for each other. Valjean, however, soon shatters their happiness. Worried that he will lose Cosette and unnerved by political unrest in the city, Valjean announces that he and Cosette are moving to England. In desperation, Marius runs to his grandfather, M. Gillenormand, to ask for M. Gillenormand’s permission to marry Cosette. Their meeting ends in a bitter argument. When Marius returns to Cosette, she and Valjean have disappeared. Heartbroken, Marius decides to join his radical student friends, who have started a political uprising. Armed with two pistols, Marius heads for the barricades.
The uprising seems doomed, but Marius and his fellow students nonetheless stand their ground and vow to fight for freedom and democracy. The students discover Javert among their ranks, and, realizing that he is a spy, Enjolras ties him up. As the army launches its first attack against the students, Eponine throws herself in front of a rifle to save Marius’s life. As Eponine dies in Marius’s arms, she hands him a letter from Cosette. Marius quickly scribbles a reply and orders a boy, Gavroche, to deliver it to Cosette.
Valjean manages to intercept the note and sets out to save the life of the man his daughter loves. Valjean arrives at the barricade and volunteers to execute Javert. When alone with Javert, however, Valjean instead secretly lets him go free. As the army storms the barricade, Valjean grabs the wounded Marius and flees through the sewers. When Valjean emerges hours later, Javert immediately arrests him. Valjean pleads with Javert to let him take the dying Marius to Marius’s grandfather. Javert agrees. Javert feels tormented, torn between his duty to his profession and the debt he owes Valjean for saving his life. Ultimately, Javert lets Valjean go and throws himself into the river, where he drowns.
Marius makes a full recovery and is reconciled with Gillenormand, who consents to Marius and Cosette’s marriage. Their wedding is a happy one, marred only when Valjean confesses his criminal past to Marius. Alarmed by this revelation and unaware that it was Valjean who saved his life at the barricades, Marius tries to prevent Cosette from having contact with Valjean. Lonely and depressed, Valjean takes to his bed and awaits his death. Marius eventually finds out from Thénardier that Valjean saved Marius’s life. Ashamed that he mistrusted Valjean, Marius tells Cosette everything that has happened. Marius and Cosette rush to Valjean’s side just in time for a final reconciliation. Happy to be reunited with his adopted daughter, Valjean dies in peace.