A day after their adventure at the Pokémon Trainers' School, Ash and Pikachu have some last-minute training with Iron Tail. Over breakfast, Ash confides that Iron Tail is still hit-or-miss, but what is more surprising is that May wants to pass up on the Gym battle. When the others ask why, May admits that she started her journey as an excuse to travel, and not having liked Pokémon when she began, but later had found her true calling in Pokémon Contests. Thus, she decides to become a Coordinator. Ash is particularly supportive of her decision, and he, Max, and Brock agree to do whatever it takes to help. Meanwhile, at a nearby playground, Team Rocket learns that Roxanne is the Rustboro Gym Leader, and vows to take their revenge for yesterday's defeat.
At the Gym, May and Max remark that it is different compared to the Petalburg Gym, they are greeted by Roxanne and some of her senior students working at the Gym as interns. Expecting two battles in succession, Roxanne respects May's decision to pass and become a Coordinator instead. After exchanging more formalities, including allowing the battle to be filmed for the Pokémon Trainers' School, Ash and Roxanne begin their two-on-two Gym Battle. Max is also excited because this will be the first Gym match he has seen as his father, Norman didn't allow either of his children to watch his battles since he believed that they would distract the challenger.
Roxanne leads off with Geodude, while Ash sends out Treecko. Though Treecko has the type advantage, Brock notes that Treecko does not know any Grass attacks, rendering the point moot. Ash starts with Treecko using Quick Attack, which Geodude replies with a Mega Punch, sending Treecko flying. Treecko recovers from the fall and it hits back with a midair Pound, which makes its mark, but does not knock it out. Geodude recovers with Rollout, but when Treecko tries to jump and dodge, Geodude follows, and it knocks out Treecko with another Mega Punch.
Ash decides to send in Pikachu, surprising the senior students and Roxanne. Undeterred, Pikachu starts by destroying the rock field with Thunder. Meanwhile, Team Rocket begins their plan to tunnel into the Gym and stealing Pikachu by shoveling by hand — as James notes, this would save them money because they waste so much with their more elaborate schemes. Back at the battle, though Pikachu has destroyed the field, he has yet to damage Geodude. Roxanne notes that it allows Geodude greater maneuverability, and better use of Rock Throw. Pikachu dodges the rocks with Quick Attack, but takes a Mega Punch. When Roxanne tries to use Rollout to finish Pikachu off, though, Geodude gets stuck on the softer battlefield, making an opening for Pikachu to get close with Quick Attack and get the knockout with Thunder. Roxanne admits that Ash has talent, as Geodude had never been knocked out by an Electric-type attack alone.
Roxanne calls out her Nosepass, a Pokémon unfamiliar to Ash. Pikachu starts off with Iron Tail, which makes its mark, but when Pikachu tries to use it again, it fails. Nosepass responds with a Rock Tomb, trapping Pikachu in boulders. However, Pikachu breaks free with Thunder. Nosepass then uses Sandstorm, making Pikachu unable to find Nosepass, and allowing Nosepass to pin Pikachu to the battlefield. Pikachu soon escapes, and manages to evade another Rock Tomb with a Quick Attack. Pikachu runs circles around Nosepass in an attempt to disorient it, which allows another shot with Iron Tail. However, the move fails yet again. Brock notes that Pikachu is too worn out from running around, and thus does not have the time to store up energy for a successful Iron Tail. Nosepass tries to finish off Pikachu with Zap Cannon, but Pikachu dodges in time. The attack, however, hits James' shovel as it breaks through the Gym floor, shocking Team Rocket and sending them flying out of their tunnel.
While Ash ponders how Nosepass could use an Electric attack, Roxanne tells him that Zap Cannon was inspired by Ash's own strategy of keeping a surprise attack - as was the case with Pikachu and Iron Tail. Pikachu, however, though exhausted, can still battle. Anticipating another Iron Tail, Nosepass uses Zap Cannon again, to which Ash tells Pikachu to take the hit head-on. As he is low on power, the Zap Cannon recharges Pikachu instead, paralyzing Nosepass and allowing it to be struck by another Iron Tail. This time, Iron Tail is successful, and Nosepass is knocked out. This earns Ash the match victory and the Stone Badge.