Ash and friends spot their ninja friend Sanpei and his Greninja floating down a river, unconscious! After they mount a rescue, Sanpei explains that he’s on a mission for his ninja master, Saizo, but a masked ninja and his Barbaracle partner keep trying to interfere.
The gang decides to help Sanpei on his mission, but soon Ash and Sanpei are separated from the others—just as the masked ninja strikes again! Froakie and Greninja team up to fight him off, and when the battle seems to be going against them, Froakie evolves into Frogadier!
The masked ninja then directs Ash and Sanpei to the manor where their friends are waiting. There, they discover their pursuer is none other than Saizo, who has been using their encounters as a test of Sanpei’s skills—and Sanpei has passed with flying colors! With everyone safely reunited, Ash challenges Sanpei to a battle, and soon our heroes are off once again to Coumarine City.
On their way to Coumarine City, Ash practices with Froakie and Pikachu while his friends watch. During this, Dedenne and Bonnie notice something floating in the river. Ash realizes that it's Sanpei, and immediately dives in to save him. Back on shore, Sanpei wakes up while Clemont heals Greninja of its poisoning. He is startled at first, but is pleasantly surprised to see the group again after such a long time. Ash takes the opportunity to check Greninja with his Pokédex, to which Sanpei explains that Greninja had evolved from his Frogadier.
When they try to find out why Greninja was poisoned, they hear a voice of an enemy ninja who, along with his Barbaracle, attacked Sanpei earlier. Barbaracle makes the first move with a Razor Shell, but is countered by Froakie's Cut. Pikachu tries a Thunderbolt on Barbaracle, who is not even affected. Nearby, Team Rocket observes the situation and plans to take advantage of it by capturing Pikachu. Clemont realizes that they will be overpowered to which Sanpei uses his ninja leaf shroud technique to escape from the ninja and his Barbaracle. Later, everyone is safe, but Clemont remembers that the ninja demanded a secret scroll from Sanpei. Sanpei tells them that his instructor, Saizo, had given him the scroll to be delivered to a Safe House before sunset; he was ambushed by the ninja soon after he left. During the ambush, Greninja got poisoned by Barbaracle's Poison Jab while a Razor Shell attack knocked them both into the river.
Sanpei cannot explain why the ninja wants the scroll, but he has to deliver it as requested. Ash and his friends decide to help Sanpei but Clemont realizes that they have to proceed with a plan. Clemont decides to trick the ninja by inventing a mechanical set of decoys, named the "Robo Step by Step", and sends it on its way. Meanwhile, Team Rocket are trying to find the twerps. They soon notice footprints and hear them approaching. Jessie and James start their motto, but are interrupted by Meowth, who points out that it is a machine. An angry Jessie kicks the decoys, causing it to explode.
Meanwhile, Sanpei shows Ash and his friends his map of the area. He points out the location of the manor, which he acknowledges that they won't be able to reach during the day following the path. Ash asks if there are any shortcuts, to which the group decide to take a dangerous route through the mountains. They start by taking the narrow wooden bridge. While crossing, the bridge breaks and Clemont falls along with Serena. Clemont is saved by Froakie's frubbles while Serena is saved by Greninja's tongue. They next arrive at a tunnel which leads directly through the mountain. However they are attacked by several Golbat, though Sanpei has his Greninja use Smokescreen to distract the Golbat. Ash and Sanpei are the only ones to emerge from the caves, while the others seemingly disappear, when suddenly the masked ninja arrives. Sanpei tells Ash to look for Serena, Clemont, and Bonnie, but Ash insists that he will stay and battle. Froakie and Greninja start the battle using Double Team and surround Barbaracle. Ash and Sanpei command Froakie and Greninja to use Water Pulse and Water Shuriken respectively. But Barbaracle dodges, causing the attacks to instead destroy the duplicates. Pikachu then uses Electro Ball but is countered by Razor Shell. Suddenly, a net is thrown towards Pikachu, but he dodges. Team Rocket reveal themselves before Meowth throws another net. However, Saizo and his Barbaracle cut it, as Sanpei and Ash are his prey. Meowth and Jessie's Wobbuffet charge to attack, but are hit by Barbaracle's Razor Shell. Using Water Pulse and Water Shuriken, Froakie and Greninja blast Team Rocket off for good.
Sanpei and Ash continue to battle the masked ninja. His Barbaracle uses Poison Jab, but Greninja dodges it. Froakie uses Double Team, followed with Cut, along with Pikachu's Iron Tail. Barbaracle smudges them all using Mud-Slap, negating the attacks and knocking its opponents away. Barbaracle uses Poison Jab, intending on finishing Greninja. From beneath some rocks, Froakie is determined to leap to his allies’ defense, prompting him to evolve into Frogadier, taking the hit. Barbaracle uses Razor Shell, which Frogadier counters with Cut. Barbaracle uses Poison Jab, though gets attacked by Frogadier's Aerial Ace. Saizo uses his ninja powers and escapes, telling them they can find their friends at the Safe House. Ash is cautious, but Sanpei admits that it may be a trap but they still have to continue in order to find their friends.
Ash and Sanpei arrive at the manor, where they are greeted by Serena, Clemont, and Bonnie, who are all surprisingly safe. Saizo again reappears although masked. He removes his mask, and Sanpei recognizes him as his master. Saizo reveals that he was the one who took Serena, Clemont, and Bonnie because he did not want to involve Sanpei's friends in this, however he failed to grab Ash. Sanpei is still shocked that everything was orchestrated before handing over the secret scroll to officially complete the mission in time. Saizo was impressed by Sanpei’s performance during the quest, and remarks that he will be reporting all of the day's events directly to the elder of Ninja Village. Serena then sees that Ash's Froakie has evolved into a Frogadier. Bonnie asks Frogadier if it can return back to a Froakie and then evolve in front of her as she wanted to witness its evolution, but Clemont admits that things don’t work like that. Seeing the opportunity, Ash and Frogadier challenge Sanpei and Greninja to a battle, which they accept.