Years before the events of the first film, Lord Shen (Gary Oldman), the scion of a peacock clan that rules Gongmen City in ancient China, seeks to weaponize gunpowder, which had recently been invented to create fireworks. After discovering from the court’s goat Soothsayer (Michelle Yeoh) that “a warrior of black-and-white” will defeat him if he does not change his ways, Shen leads an army of wolves to exterminate the panda population to avert the prophecy. Shen’s parents are horrified at this atrocity and exile their son, who swears revenge.
About twenty 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. His teacher Shifu (Dustin Hoffman) tells him, however, that he has yet to achieve inner peace. While defending a village from wolf bandits who have been stealing refined metal for Shen, Po is distracted by a symbol on the wolf leader’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), about his origins. Ping reveals that he found Po as an infant in a radish crate and adopted him, but Po remains unsatisfied, wondering how and why he ended up in the Valley of Peace.
Shifu receives word that Shen has returned to Gongmen City and killed Thundering Rhino, the leader of the kung fu council protecting the City, and is plotting to conquer China with his newly developed weapon, a cannon. Shifu sends Po and the Furious Five to Gongmen City to stop Shen and destroy his weapon. They find the city occupied by Shen’s forces, with the two surviving council members Storming Ox and Croc imprisoned. The six heroes ask the council members for help to liberate the city, but the two cite their helplessness against Shen’s weapon and refuse. Po and the Five are discovered by the wolf boss and give chase, only to be arrested in front of Shen’s tower.