After traveling to an unfamiliar place, Ash encounters the Pokémon School in ruins. The mysterious Dia explains that Ash must be from a parallel world, where the Alola region hasn’t been destroyed.
After convincing Zeraora to help Pikachu train, Ash teams up with Dia to force Guzzlord back to its own world through an Ultra Wormhole. Zeraora and Pikachu use powerful attacks against Guzzlord’s weak spot, but it isn’t enough. Then, the parallel world’s Tapu Koko appears and enables them to use their Z-Moves again, and it works! Guzzlord is banished, and for the first time, Dia sees hope for his world as Ash returns to his own.
Ash stands in front of Dia's base and is perplexed by the ruined building's remarkable resemblance to the Pokémon School. After entering the building, Ash notices a trio of photographs that confirm the building is indeed the Pokémon School, and Dia explains that he must be in a parallel world. He draws on the blackboard and explains the concept, warning that if aspects of the two worlds mixed, more parallel realities will be created. When Ash is confused by the idea, Dia explains that, ten years ago, his Melemele Island was bought up and overdeveloped, which led to widespread pollution of the area. Afterwards, Guzzlord arrived and reduced everything to ruins. Dia warns Ash that choosing the wrong path in his world may result in what has unfolded in the Ultra Ruin. Speechless, Ash goes to a pool of water to reflect on his own world and his classmates.
Dia sees Ash's somber mood and offers him a tin of baked beans, which Ash accepts. Ash then notices Zeraora's absence, but Dia tells Ash that it prefers to be alone since it actually isn't his Pokémon. Rather, it was its intent to send Guzzlord back to its own world that brought the pair together. In a flashback, Dia reveals that he almost sent Guzzlord back through an Ultra Wormhole, but the Ultra Beast successfully resisted. Zeraora showed up in time and struck Guzzlord with Plasma Fists, and this led the pair to bond and fight together. Dia informs Ash that Guzzlord has one weakness, the second face above its large mouth, but the Ultra Beast has too many defenses that protect it. Ash sympathizes with Dia's dilemma and notes that he might be more successful if he could use Z-Moves. Dia pulls his own Z-Ring out from his bag and adds that Z-Moves have been impossible to perform since the nature of his world was destroyed and Tapu Koko vanished.
Seeing Dia's faith despite all the odds, Ash and Pikachu launch into some training. Ash plants a can and has Pikachu aim his Electroweb at it, followed by a Thunderbolt. The two attacks land and send the can rolling on the ground. The display only irritates Dia and infuriates Zeraora, who goes on to throw a rock at Pikachu. However, Pikachu manages to shatter the rock into pieces with a Thunderbolt and to Dia’s surprise, Ash claims that Zeraora was simply helping with their training. Ash calls on Zeraora to join them and has Pikachu use Electroweb to bring it down to ground level. A battle begins, and Pikachu uses another Electroweb. Zeraora slashes through the attack and unleashes Plasma Fists. Pikachu counters with Thunderbolt and follows up with Quick Attack. Zeraora manages to evade Pikachu's speed and swats him away with its sharp claw. Even after an assault of attacks by Zeraora, Ash and Pikachu declare that they are not finished yet. Zeraora smiles as Dia smirks, and the training regime continues. Zeraora launches into a Quick Attack to evade Pikachu's Thunderbolts and manages to land a hit on Pikachu. Zeraora approaches with another Quick Attack, but Pikachu manages to track its speed and Thunderbolts Zeraora. As a reward, Zeraora gifts Pikachu a Sitrus Berry. The present is well received as Pikachu happily polishes off the Sitrus Berry. Dia commends Ash and Pikachu on their partnership, and Ash retorts that Dia and Zeraora are much the same.
The battle also manages to attract Guzzlord's attention, and the Ultra Beast shows up. Dia throws a tin to get Guzzlord to follow them to the Ultra Wormhole. As they run, Dia tells Ash that they'll use Pikachu's Electroweb first followed by a simultaneous Thunderbolt and Plasma Fists. Ash agrees to the plan before the group is faced by Guzzlord. They make an emergency right turn as Guzzlord falls through several floors to the basement level. Dia manages to haul Ash up from the hole left in the floor, and the group continues toward the Ultra Wormhole. They soon arrive, and Dia notices the Wormhole is shrinking, making the situation even more urgent. Guzzlord once again approaches and the group puts their plan into motion. Pikachu ensnares Guzzlord in an Electroweb. The attack leaves Guzzlord immobile and vulnerable as Pikachu and Zeraora strike with a simultaneous Thunderbolt and Plasma Fists respectively. Guzzlord manages to break free of the web and screams out at the group. Guzzlord approaches again and Zeraora unleashes a fury of Close Combat attacks on it. However, Guzzlord hits Zeraora away, knocking it into Dia. The Ultra Wormhole continues to shrink and Dia tells Ash and Pikachu to run away.
The situation seems dire. Guzzlord smashes its way to the group and jumps as it prepares to engulf them. Then, the Shiny Tapu Koko arrives on the scene and ensnares Guzzlord in electricity. Tapu Koko lets out a cry that reactivates Dia and Ash's Z-Rings. The duo are pleased and have Pikachu and Zeraora perform a double Gigavolt Havoc. The two Z-Moves combine into a swirling blue and yellow beam of electricity that overwhelms Guzzlord and pushes the Ultra Beast into the Ultra Wormhole. Afterwards the Ultra Wormhole closes. Dia is left speechless by the achievement as Ash goes on to hug Zeraora to thank it.
The Shiny Tapu Koko promptly flies into the air and unleashes a bolt of lightning into the sky. Dia quickly realizes that Ash still needs to return to his world. The pair decide to have a battle to assist Ash's return home. Zeraora and Pikachu's Quick Attacks prove evenly matched. Zeraora tries Close Combat and Pikachu replies with an Iron Tail. But it is Pikachu's Thunderbolt colliding with Zeraora's Plasma Fists that leads to the opening of another dimensional rift. Ash and Pikachu rush into the blaring light, eager to return home. Dia tells Ash that he'll help to restore his Alola, and Ash agrees to take care of his world. The pair hope to have another battle together and the dimensional rift soon closes.
Ash and Pikachu return to their world and are greeted by Rotom. Tapu Koko quickly flies away. Ash rushes to the Pokémon School, leaving Rotom and his Bag behind. He happily greets his friends and apologizes to Kiawe for missing yesterday's battle. However, Kiawe is left confused and despite the amount of time that passed in the alternate world, little to no time appears to have passed in Ash's own world. Ash and Pikachu admire the beauty of Alola from one of the school's balconies while Dia and Zeraora look over the ruins of their world. The Shiny Tapu Koko flies into the sky and brightens the dusty world with a rainbow aurora; a sign of better things to come.