Haruka! The First Pokémon Contest Challenge!! - S6-E35
Continuity mistake: When Ash suggests that May could check the date for the contest earlier, the buildings on the side change between shots. Also, the left side of his hat constantly changes from red to black. (00:00:03)
Answer: He is a good guy but just found himself in a bad situation when he worked for Lysander. He didn't want him to harm Ash and his Pokémon when he was trying to get the special bond between Ash and his Greninja to work. He does leave Lysander and go back to being a good person.