At a political meeting in a small cafe, a group of idealistic students prepare for the revolution they are sure will erupt on the death of General Lamarque. When Gavroche brings news of the General's death, the students, led by Enjolras, stream out into the streets to whip up popular support. Only Marius is distracted by the thoughts of the mysterious Cosette.
Cosette is consumed by thoughts of Marius with whom she is fallen in love. Valjean realizes that his "daughter" is changing but refuses to tell her anything of her past. In spite of her own feelings for Marius, Eponine sadly brings him to Cosette and then prevents an attempt by her father's gang to rob Valjean's house. Valjean, convinced it was Javert who was lurking outside his house, tells Cosette they must prepare to flee the country. On the eve of the revolution, the students and Javert see the situation from their different viewpoints; Cosette and Marius part in despair of ever meeting again; Eponine mourns the loss of Marius; and Valjean looks forward to the security of exile. The Thenardiers, meanwhile, dream of rich pickings underground from the chaos to come.
The students prepare to build the barricade. Marius, noticing that Eponine has joined the insurrection, sends her with a letter to Cosette, which is intercepted at the Rue Plumet by Valjean. Eponine decides to rejoin Marius at the barricade.
The barricade is built and the revolutinaries defy an army warning that they must give up or die. Gavroche exposes Javert as a police spy. In trying to return to the barricades in search of Marius, Eponine is shot and killed. Valjean arrives at the barricades in search of Marius. He is given a chance to kill Javert but instead lets him go.
The students settle down for a night on the barricade and in the quiet of the night, Valjean prays to God to save Marius from the onslaught which is to come. The next day, with ammunition running low, Gravoche runs out to collect more and is shot. The rebels are all killed.
Valjean escapes into the sewers with the unconscious Marius. After meeting Thenardier who is robbing the corpses of the rebels, he emerges into the light only to meet Javert once more. He pleads for time to deliver the young man to the hospital. Javert decides to let him go and, his unbending principles of justice having been shattered by Valjean's own mercy, he kills himself by throwing himself into the swollen River Seine.
A number of Parisian women come to terms with the failed insurrection and its victims. Unaware of the identity of his rescuer, Marius recovers in Cosette's care. Valjean confesses the truth of his past to Marius and insists that after the young couple are married, he must go away rather than taint the sanctity and safety of their union. At Marius and Cosette's wedding, the Thenardiers try to blackmail Marius. Thenardier says Cosette's "father" is a murderer and produces a ring which he stole from the corpse in the sewers the night the barricades fell. It is Marius's own ring and he realizes it was Valjean who rescued him that night. He and Cosette go to Valjean where Cosette learns for the first time of her own history before the old man dies, joining the spirits of Fantine, Eponine and all those who died on the barricades.