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 Master Shifu (Dustin Hoffman) tells him he has yet to achieve inner peace. While fighting off a pack of wolfbandits 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 vegetable 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 reach the imprisoned council members Storming Ox (Dennis Haysbert) and Croc (Jean-Claude Van Damme) for their help to liberate the city, but both masters cite their helplessness against Shen's weapon and refuse to escape. Po and the Five continue to make the attempt alone, only to be discovered by the wolf leader. Po and the Five chase him to try to prevent him from alerting Shen, but are captured.
Upon being brought before Shen in his tower, Po and the Five free themselves and destroy Shen's cannon. However, Po is again distracted by flashbacks upon seeing the same symbol as before on Shen's plumage, allowing Shen to escape and reveal an arsenal of cannons, which he uses to destroy the tower. After the heroes escape, Tigress (Angelina Jolie) confronts Po over his distractions. After Po explains he needs answers about his origins from Shen, and that they would never understand, Tigress embraces him in empathy. However, she orders the distracted panda to stay behind. Po, regardless, breaks into the factory to question Shen, inadvertently foiling the Five's attempts to destroy the factory. Acknowledging he destroyed Po's village and claiming Po's parents abandoned him, Shen blasts Po out of the factory and captures the Five.
Po survives and is rescued by Shen's soothsayer, who has been exiled by Shen to the ruined village where Po was born. The soothsayer guides Po to embrace his past, and Po remembers that, against Shen's claims, his parents endangered themselves to save him and his mother hid him in a crate. 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 (which includes Shifu, who had persuaded Ox and Croc to take action), Po uses his inner peace to gauge Shen's cannon fire and redirect it against Shen's armada. He then urges Shen to come to terms with 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 pandas, and senses that his son is also alive.