Ash's Gengar has a previous Trainer three years prior to
Ash Ketchum catching it. They ran into each other while
Ash's Gengar was attached to
Ash Ketchum's shadow. He got rid of Gengar because he was very unlucky. He couldn't win a battle, and every Pokémon he tried to catch would get away. He also would fall down the steps and he'd lose things all the time. He blamed all these mishaps on Gengar's curse. He left Gengar at the building that years later would become the Cerise Laboratory. Since then, he thinks his luck had changed without Gengar.