Po the panda is living his dream as the Dragon Warrior, protecting the Valley of Peace alongside his friends and fellow kung fu masters, the Furious Five. However, his teacher Shifu tells him that he has yet to achieve inner peace. While defending a village from wolf bandits who have been stealing metal, Po is distracted by a symbol on their leader's armor, which causes him to have a flashback of his mother and allows the wolves to escape. Po asks his goose father, Mr. Ping, 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.
Shifu learns that Lord Shen, the scion of a peacock clan that rules Gongmen City, returned to Gongmen City after being banished by his parents for exterminating the panda population to avert a prophecy that a warrior of black and white would defeat him and killed Thundering Rhino, the leader of the kung fu council protecting the City, and is plotting to conquer China with his newly developed cannon that was forged with the stolen metal. 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, refusing to help liberate the city due to Shen's "unstoppable" weapon. Po and the Five are discovered by the wolf boss and give chase, only to be arrested in front of Shen's tower.
Upon being brought before Shen in his tower, Po and the Five escape (due to Master Mantis not really being captured) and destroy Shen's weapon. However, Po is again distracted by a flashback upon seeing the same symbol as before on Shen's plumage, realizing Shen was there the last night Po saw his parents. This allows Shen to escape and destroy the tower with an arsenal of cannons. After Master Tigress demands to know why Po let Shen get away, he reveals that Shen knows something about his past and has to face him again. Though understanding, Tigress makes Po stay at the prison while she and the other Furious Five leave to stop further production of Shen's cannons. Po breaks into the factory to question Shen about his past, inadvertently foiling the Five's plan to destroy the factory and causing them to be captured. Shen claims that Po's parents abandoned him before Shen blasts Po out of the factory with a giant cannon, where he is presumed dead.
Po survives and is rescued by the soothsayer, who takes him to the ruins of the nearby village where Po was born. Guided by the soothsayer to embrace his past, Po remembers that when he was an infant, his parents had sacrificed themselves to save him from Shen's army, his mother hiding him in a radish crate and luring Shen's forces away from him. Po attains inner peace, realizing that he has lived a happy and fulfilling life despite this early tragedy. Po returns to Gongmen City to save the captive Five and prevent Shen's conquest of China. A battle ensues between Shen's armada and Po, the Five, Ox, and Croc who were persuaded to fight by Shifu, who also joins the fight. Shen orders the wolf boss to fire at the heroes not caring about his own men getting caught in the crossfire. When the wolf boss refuses, Shen kills him and fires the cannon himself incapacitating all but Po. Po modifies the movements used during his inner peace training to manipulate and redirect Shen's cannonballs against his own armada, destroying them. Po then urges Shen to let go of his own past, but Shen attacks Po until he is killed when he causes his last cannon to fall and crush him.
Victorious, Po returns to the Valley of Peace and reunites with Mr. Ping, lovingly declaring the goose to be his father. At the same time, Po's birth father, Li Shan, is revealed to be alive in a hidden village inhabited by surviving pandas, and senses that his son is still alive.