An electromagnet is a particular device that takes advantage of electrical currents to produce concentrated magnetic fields. The most well-known example is a conventional solenoid, having the form of an elongated coil and creating a strong magnetic field through its center when it is connected to a current source. Spontaneous redox reactions located at opposite ends of an anisotropic Janus swimmer can effectively mimic a standard power source, due to their ability to wirelessly generate a local electric current. Herein, we propose the coupling of thermodynamically spontaneous redox reactions occurring at the extremities of a hybrid Mg/Pt Janus swimmer with a solenoidal geometry to generate significant magnetic fields. These chemically driven electromagnets spontaneously transform the redox-induced electric current into a magnetic field with a strength in the range of μT upon contact with an acidic medium. Such on-board magnetization allows them to perform compass-like rotational motion and magnetotactic displacement in the presence of external magnetic field gradients, without the need of using ferromagnetic materials for the swimmer design. The torque force experienced by the swimmer is proportional to the internal redox current, and by varying the composition of the solution, it is possible to fine-tune its angular velocity.