In 1815 France, convict Jean Valjean (Hugh Jackman) is released on parole by prison guard Javert (Russell Crowe) after serving a nineteen-year sentence. He is offered food and shelter by the Bishop of Digne (Colm Wilkinson), but steals his silver during the night. He is caught by the authorities, but the Bishop lies that the silver was given as a gift, and secures Valjean’s release. Touched by the Bishop’s love, grace and generosity, Valjean breaks his parole and vows to start an honest life under a new identity. Javert swears he will bring the escaped convict to justice.

Eight years later in 1823, Valjean has become a wealthy factory owner and mayor of Montreuil-sur-Mer. Fantine (Anne Hathaway), one of his workers, is discovered to be sending money to her illegitimate daughter, Cosette (Isabelle Allen), who lives with the unscrupulous Thénardiers (Sacha Baron Cohen and Helena Bonham Carter) and their daughter Éponine (Natalya Angel Wallace), and is dismissed by the foreman (Michael Jibson). Left with no alternative, Fantine turns to prostitution. During an argument with an abusive customer, Javert, now a police inspector, arrests Fantine, but Valjean intercedes and takes her to a hospital.

Later, Valjean learns that a man believed to be him has been arrested. Unable to condemn an innocent man, Valjean reveals his identity to the court before departing for the hospital. There he promises a dying Fantine that he will look after her daughter. After escaping from Javert, Valjean finds Cosette and pays the Thénardiers to allow him to take her, and promises to be like a father to her.

Nine years later in June of 1833, Jean Maximilien Lamarque, the only government official sympathetic toward the poor, is nearing death. Students Marius Pontmercy (Eddie Redmayne) and Enjolras (Aaron Tveit), together with street urchin Gavroche (Daniel Huttlestone), discuss fomenting revolution to overthrown the government. Later Marius catches a glimpse of Cosette (Amanda Seyfried), now a young woman, and instantly falls in love with her. Meanwhile, despite Cosette’s questioning, Valjean refuses to tell her about his past or anything about her late mother, Fantine.

At a café, Enjolras organises a group of idealistic students as Lamarque’s death is announced. Meanwhile, Éponine (Samantha Barks), now Marius’s friend, leads him to Cosette, where the two profess their love for one another. Lamenting that her secret love for Marius will never be reciprocated, Éponine fatalistically decides to join the revolution. Later, an attempted robbery of Valjean’s house makes him mistakenly believe that Javert has discovered him, and he flees with Cosette. As they leave, Enjolras rallies the Parisians to revolt, and Cosette sends a farewell letter to Marius.

The next day, the students interrupt Lamarque’s funeral procession and begin their assault. Javert poses as a rebel in order to spy on them, but is quickly exposed by Gavroche and captured. During the ensuing gunfight, Éponine saves Marius at the cost of her own life, professing her love to him before she dies, which leaves Marius devastated at the loss of his best friend. Valjean, intercepting a letter from Marius to Cosette, goes to the barricade to protect Marius. After saving Enjolras from snipers, he is allowed to execute Javert. However, when the two are alone, Valjean chooses to free Javert instead and fires his gun to fake the execution. Initially disbelieving, Javert wonders at Valjean’s generosity.

With the majority of the Parisians not joining the revolution as the students expected, they resolve to fight to the death. Everyone is killed by government troops in the final assault on the street barricades, but Marius is saved when Valjean drags his unconscious body into the sewers. Thénardier, scavenging the dead bodies, steals Marius’s ring. Valjean recovers and escapes the sewers carrying Marius, but is confronted at the exit by Javert. Javert threatens to shoot Valjean if he refuses to surrender, but Valjean ignores him. Unable to reconcile the conflict between his civil and moral duties, two things which he always considered the same, Javert commits suicide by jumping off a bridge into the Seine river.

Later, Marius mourns for his friends but Cosette comforts him. Revealing his past to Marius, Valjean tells him he must leave because his presence endangers Cosette, and makes Marius promise never to tell her. A few months later, Marius and Cosette marry; the Thénardiers crash the reception and testify that they saw Valjean carrying a murdered corpse through the sewers. Thénardier unwittingly shows Marius the ring that he stole from him as “proof.” Recognising the ring, Marius realises that it was Valjean who saved his life. Marius and Cosette rush to Valjean after being told his location by Thénardier.

As Valjean sits dying in a local convent from his long-term heart condition, he perceives the spirit of Fantine appearing to take him to Heaven. Cosette and Marius rush in to bid farewell. Valjean hands Cosette his confession of his past life, and the spirits of Fantine and the Bishop guide him to paradise, where he joins the spirits of Enjolras, Éponine, Gavroche, and the other rebels at the Barricade on the rue Soufflot.

Long ago, Lord Shen (Gary Oldman), heir of the peacock clan that ruled Gongmen City in China, sought to harness the power of fireworks as a weapon with which to rule the entire country. When he learned from the court’s goat soothsayer (Michelle Yeoh) that “a warrior of black and white” would one day defeat him, Shen assumed she was referring to the giant pandas and had them exterminated to avert the prophecy. Shen’s parents were horrified at this atrocity and exiled Shen, who swore revenge.

Thirty years later, Po (Jack Black) is living his dream as the Dragon Warrior, protecting the Valley of Peace alongside his friends and fellow kung fu masters, the Furious Five, but is told by Master Shifu (Dustin Hoffman) that he has yet to achieve inner peace. While fighting off a pack of wolf bandits who have been stealing refined metal for Lord Shen, Po is distracted by a symbol on the head wolf’s (Danny McBride) armor, which causes Po to have a flashback of his mother and allows the wolves to escape. Po asks his goose father, Mr. Ping (James Hong), where he came from, but all Ping can tell him is that he found Po as an infant in a radish crate and adopted him.

Afterward, Shifu receives word that Master Thundering Rhino (Victor Garber), leader of the kung fu council protecting Gongmen City, has been killed by Lord Shen with his newly developed weapon, a cannon, which threatens to destroy kung fu tradition. Po and the Five go to stop him, reaching Gongmen City to find it under the control of Shen’s forces. The heroes find two imprisoned council members, Masters Storming Ox (Dennis Haysbert) and Croc (Jean-Claude Van Damme), and ask their help to liberate the city, but both masters cite their helplessness against Shen’s weapon and refuse to escape. Po and the Five are then discovered by the wolf leader, who they chase to prevent him from alerting Shen, only to be captured.

Upon being brought before Shen in his tower, Po and the Five free themselves and destroy Shen’s cannon. However, Crane burns his wing and Po is again distracted by a flashback upon seeing the same symbol as before on Shen’s plumage, allowing Shen to escape and destroy the tower with an arsenal of cannons. After escaping, Tigress (Angelina Jolie) confronts Po over his distraction. Po explains that he remembers Shen’s presence on the night he was separated from his parents, and wants to question Shen about his past. Though empathetic, Tigress orders him to stay behind for his own safety. Po regardless breaks into Shen’s cannon factory to confront Shen, inadvertently foiling the Five’s attempts to destroy the factory. Shen claims that Po’s parents abandoned him before he blasts Po out of the factory and captures the Five.

Po is rescued by Shen’s soothsayer, who has been exiled by Shen to the ruined village where Po was born. Guided by the soothsayer to embrace his past, Po remembers that his parents had endangered themselves to save him from Shen’s forces, his mother hiding him in a crate before she was subdued. Attaining inner peace, Po returns to Gongmen City to save the captive Five from being executed by Shen at the city harbor. During the ensuing battle (in which Shifu participates after having persuaded Ox and Croc to do the same), Po uses his inner peace to gauge Shen’s cannon fire and redirect it against Shen’s armada. He then urges Shen to let go of his own past, but Shen refuses and attacks Po until Shen inadvertently slashes the ropes holding up his last cannon, which falls and crushes him to death. Victorious, Po returns to the Valley of Peace and reunites with Mr. Ping, declaring him to be his father. At the same time, Po’s biological father (Fred Tatasciore) is shown to be alive in a hidden village inhabited by surviving pandas, sensing that his son is also alive.