There is no character named Maxie who challenges you in Pokémon Emerald. You're likely thinking of Archie, the leader of Team Aqua, who battles you multiple times as the main antagonist.
Maxie leads Team Magma in Ruby/Omega Ruby; Archie leads Team Aqua in Sapphire/Alpha Sapphire and Emerald.