Ash and friends arrive at Moro Island where there's an Orange League trophy from 300 years ago on display at the museum. Only it was stolen by (who else?) Team Rocket. They follow them out to see when a thick fog appears and out of nowhere a ghost ship does too. After team Rocket tries (and fails) to get the trophy back Haunter posseses Meowth so it can speak with Ash and Friends about why the trophy should stay with them. Gastly provided illusionary visual aids making them experience the sensation of traveling back in time. They see the history of the captain, how he perished and how 300 years later deep-sea explorers took his most prized possession and unknowingly awaken Gastly and Haunter. Gastly also shows Ash and co. that the captain was a great Pokémon trainer and he had earned the trophy. After seeing this Ash agreed that the trophy should go back to its rightful owner. After they get off the ship it floats away into the heavens, and thus, Ash and friends continue on their journey.
This is the second episode where a Pokémon used Meowth to speak through it by possession. The first being IL019, Tentacool and Tentacruel.
The Orange League was founded over 300 years ago, given the existence of a trophy from that long ago. It is unknown how this compares to the other Leagues in Kanto, Johto, Hoenn etc.