In the beginning of the episode, Ash and his friends are traveling by a ferry from the holiday resort of Porta Vista to Maiden's Peak. After docking, they find out that they have just arrived there at the time of the annual Summer Festival. When they decide to go and enjoy it, Brock sees a beautiful girl up on the distant cliff. He immediately falls in love with her, but after being run over by a group of tourists he notices that the girl has disappeared. Pikachu is the only one that seems to notice that the girl is actually a Gastly, but Ash and Misty don't seem to notice her at all.
As usual, Team Rocket follows Ash and company to Maiden's Peak. They come up with an idea to look around for dropped coins, and while pondering it, James sees the same girl Brock saw before, only by the water. Jessie slaps James to regain his attention. As they leave to look for the coins, James takes a final look at the dock, noticing the disappearance of the girl. During the festival, Ash, Misty, and Brock meet an old lady. She warns Brock that he should beware a young, beautiful girl who will lead him to a cruel fate. After the old lady calls Misty a "scrawny blabbermouth", Misty decides that they should be somewhere else instead of being insulted and drags off Ash and Brock with her. Meanwhile, Team Rocket puts their plan into action, though they do not seem to find anything. Then, James notices a penny lying on the walkway, but as he approaches it he is interrupted by the old lady, which Ash and company met just a moment ago. As in the case of Brock, she mentions the young girl to James. Then an Officer Jenny appears and takes away the coin James found. When she suggests that they go down to the station with her to fill out a report, Team Rocket stammers that it is all right, they do not need to go down to the station, and then they flee the scene.
Both Ash's group and Team Rocket head for the Shrine of the Maiden. They see the shrine's greatest treasure, the painting of the maiden. Brock and James both realize that the girl in the painting is the same girl they saw before, and both attempt to approach the painting but are blocked by the man presenting the painting to the audience. He then tells the story of the maiden, who waited on the cliff for her loved one to return from the war, and eventually turning into stone. The two groups go to take a closer look at the aforementioned cliff, and Meowth formulates a plan to steal the painting with the intention of selling it for a lot of money. They decide to swipe the painting later that evening. As night falls, Brock is still at the cliff. Misty tries to make him forget the stone so they can go back and enjoy the festival, but Brock insists on staying a little bit longer, so Ash and Misty leave him sitting there. When it is about time for the local Pokémon Center to lock the doors for the night, Brock still has not returned from the cliff, unlike they had planned. Ash decides to go look for Brock, but Nurse Joy holds him back, giving Ash a short lecture on the importance of sleep.
In the middle of the night, Meowth tries to wake up Jessie and James so they can try to steal the painting, but the two are not very eager to wake up. Suddenly a strong wind starts blowing, and the doors of the Maiden's Shrine are blown open. The ghost of the maiden floats out from the inside, causes Meowth to fall asleep and then wakes up James. She also shows herself to Brock, telling him that she's been waiting for him. Brock replies that he has been waiting, too. Ash and Misty start looking for Brock on the next morning, while Meowth and Jessie start looking for James. Ash and Jessie then meet face-to-face and notice that they both are looking for a missing person. Jessie performs the Team Rocket motto all alone, but then they hear James saying his lines. James is thrown from inside the shrine, followed by Brock. As they all try to return Brock and James normal, the old lady appears again, reminding them of her warning about the ghost of the maiden. Ash's Pikachu shocks James and Brock, and the two of them finally revert to their normal selves. They all head inside, and the old lady states that all young men have fallen into the curse while passing through Maiden's Peak. They decide to protect themselves from the ghost by buying a large quantity of anti-ghost stickers and sticking them around the shrine and the two cursed ones. However, when night comes, they note that the stickers do not work, and just like the previous night, the ghost of the maiden appears. Ash and others try to prevent Brock and James from being pulled out by the maiden.
After being shot with a bazooka by Jessie, the ghost of the maiden summons several skull-like ghostly apparitions. Ash tries to identify them with his Pokédex, but with no results. However, the Pokédex is still searching for one and when Ash points the Pokédex at the ghost of the maiden, it identifies her as a Gastly, who is impersonating the old lady as well. Since Gastly's disguise has been revealed, it transforms back to its normal form. Ash then challenges it to a battle. Ash commands Pikachu to start the battle, but Gastly summons a living mouse trap to scare Pikachu off. Meowth states that mouse traps do not work on him, but Gastly summons a ball for him to play with, distracting him. Jessie then sends out Ekans, only for it to be scared off by Gastly's newly summoned mongoose. James commands his Koffing to attack with the Poison Gas attack, but the mongoose stomps it down.
Ash decides that it is his turn to try again and calls out Charmander. Gastly summons a fire extinguisher, and Ash has to call Charmander back, mainly because Charmander was too busy running from the water to battle. He then calls out both Squirtle and Bulbasaur, but Gastly summons a Venusaur and a Blastoise, which causes Ash's Pokémon to become too scared to do anything, and just because it thinks it is fun, it combines them into a hybrid called "Venustoise". After repeatedly being beaten by Gastly, Misty tries another strategy. She uses a cross, garlic, a stake, and a hammer, comparing Gastly to a vampire. However, the sun starts to rise once again, and as Gastly hates sunlight, it disappears, saying that the ghost of the maiden and the old woman will return come next year's festival. On the following night, the festival continues on. Ash and his friends have fun, and everything is back to normal. As the episode ends, the true ghost of the maiden emerges from her stone self, thanking Gastly for keeping her legend alive in the town.