In ancient feudal China, Princess Isabella is part ruler and Master Perry has given up the way of the warrior. After Phineas and Ferb witness Doofus Khan capture the Princess and take her as a prisoner, they track down Master Perry and convince him to teach them his warrior ways so they can rescue Princess Isabella and save China.