Ash prepares for his fourth Gym battle against Morty and his powerful team of Ghost-type Pokémon by listening to his Pokédex's entry about Gengar. Unfortunately, the Pokédex states that details about Gengar are unknown. As Ash muses over battle strategies, Nurse Joy arrives with his Pokémon after healing them in the Pokémon Center. They talk about the difficulty of facing Morty's Ghost-type Pokémon and Nurse Joy suggests that Ash should use his Noctowl as a secret weapon. Ash thinks back to yesterday's events, where Noctowl used Foresight to reveal the Gastly in the Burned Tower. Brock agrees with Nurse Joy's suggestion, and Ash considers the suggestion further.
At the Gym, Morty has his Gengar demonstrate Confuse Ray to a group of young Trainers as an example of how to fight without using brute force. Ash and his friends interrupt the lecture to challenge the Gym. Morty suggests that his students be allowed to watch and Ash agrees.
Meanwhile, Team Rocket floats over Ecruteak City in their hot air balloon. James is pleased that he still has his Itemfinder with him and smiles as it continues blinking away. Jessie groans that the device only finds junk and James attempts to prove her wrong by displaying his prized collection of bottle caps, although he declines to explain what makes them so valuable. At that moment, the Itemfinder appears to be picking up something as they fly over the Burned Tower, so they descend in the hopes of uncovering real treasures. They land and James follows the Itemfinder directly to the Ecruteak Gym where Ash is about to have his Gym match against Morty.
The referee explains the rules of the match before the battle begins. Morty starts things off with his Gastly and Ash calls on his Noctowl. Ash has Noctowl begin with Hypnosis, which Gastly dodges, disappearing in the process. Ash has Noctowl use Foresight, allowing it to soon find Gastly. Noctowl attempts to Tackle Gastly, but the Gas Pokémon easily dodges the attack again and again. After failing to Tackle Gastly, Noctowl tries to use Hypnosis; however, Morty orders Gastly to close its eyes to avoid being hypnotized and to use Lick, which whips Noctowl out of the air. Ash recalls Noctowl to its Poké Ball, and Brock points out that this is a good strategy since Noctowl's Foresight will keep Gastly from disappearing, and Ash can use Noctowl again later on if he needs to.
With Foresight keeping Gastly in view, Ash chooses Pikachu to replace Noctowl. Pikachu begins by using Quick Attack, which knocks Gastly backwards. Gastly lies on the ground for a moment before recovering itself. Pikachu uses Thunderbolt, but Gastly dodges and counters with Night Shade. Ash rushes to Pikachu's side, but his friend is declared knocked out and unable to battle any further. After thanking Pikachu for his hard work, Ash chooses Cyndaquil as his next Pokémon.
Ash has Cyndaquil start things off with a Flamethrower attack. Gastly dodges, countering with Night Shade, which Cyndaquil dodges using Quick Attack. Gastly uses Lick but Cyndaquil just runs up Gastly's tongue and Tackles it, finally defeating it. Morty chooses Haunter as his second Pokémon. Cyndaquil tries to hit it with Flamethrower, but Haunter disappears and then uses Mean Look, which extinguishes Cyndaquil's back flames and forces Ash to use Cyndaquil until the end of the round. Ash orders Cyndaquil to fire back up and use its Swift attack, which hurts Haunter. Haunter uses Hypnosis, which nearly works, but Cyndaquil counters with Smokescreen. Through the Smokescreen, Haunter grabs Cyndaquil and Licks it before tossing it to the floor, rendering Cyndaquil unable to battle. With the Fire Mouse Pokémon down and out, Ash is now down to only his Noctowl.
After Ash brings it back out, Noctowl uses Foresight to keep Haunter from disappearing. Noctowl follows this up with a Tackle, but Haunter forces Noctowl to dodge its hands to avoid being grabbed instead. Haunter tries to Lick its opponent, but Noctowl dodges the attack. The two Pokémon each use Hypnosis and Confuse Ray, with both status moves colliding against each other, but Noctowl's Hypnosis loses the struggle and gets blown away, allowing the Confuse Ray to hit Noctowl. Haunter uses Night Shade, but the confused Noctowl still Tackles through the attack. The two attacks collide and Noctowl comes out of it no longer confused. Ash notices Noctowl’s horns are now glowing blue. Brock remarks that Noctowl must have learned Confusion, which Ash confirms with his Pokédex. Noctowl uses its new move on Haunter and easily wins the round.
Morty sends out Gengar as his third and final Pokémon. Noctowl uses Confusion while Gengar tries a Shadow Ball. The Confusion attack hits the Shadow Ball, making it explode, showering everyone with dark energy. Gengar disappears and begins attacking Noctowl with Night Shade. While Noctowl manages to evade the attacks, its attempts to use Foresight fail. Misty is surprised that Gengar can attack while it is invisible and Brock says that Noctowl cannot win without using Foresight. Ash thinks for a moment and then tells Noctowl to send Confusion through the building. This reveals Gengar and Noctowl is able to use Foresight on it. Gengar attempts to use Shadow Ball again, but Noctowl stops it with a Tackle. After hitting the ceiling and falling to the floor, Gengar is now unable to battle, giving Ash the victory. Before the group heads out, Morty admits that Ash may actually have seen Ho-Oh, then hands over the Fog Badge.
As the battle waged on, James's Itemfinder led him and his teammates to wander into a store room. As they were about to pilfer it of its rare treasures, including ancient swords and valuable vases, a group of Gastly transported them into an illusion – an endless chase for a banquet table of food, which eventually turns into the table attempting to eat them. Team Rocket finally flees from the haunted building, complaining of how nightmarish the day has been.