Magnemite debuted in Clemont's Got a Secret when Ash and his friends snuck in the Lumiose Gym. It served as a patrol for the Lumiose Gym while Clembot was in control of it. After Clemont greeted Magnemite upon his return, it was initially happy but then remembered its orders and attacked him with Thunder Shock. It continued attacking until Froakie's Frubbles put a stop to it. Magnemite was then seen along with the other Pokémon cheering for Clemont after defeating Clembot.
Magnemite is very loyal both to Clemont and Clembot, albeit to a fault, as shown when Clembot's orders for it to attack any intruders led to it attacking Clemont, also demonstrating how it takes orders from either of them very seriously.