The electrochemical performances of magnesium, magnesium–lithium–aluminum–cerium and magnesium–lithium–aluminum–cerium–yttrium as the anode of magnesium–hydrogen peroxide semi-fuel cells have been studied by methods of potentiodynamic, potentiostatic and electrochemical impedence measurements. The surface morphologies of magnesium and its alloys have been examined by scanning electron microscopy (SEM). It has been found that magnesium–lithium–aluminum–cerium and magnesium–lithium–aluminum–cerium–yttrium electrodes are less corrosion resistant than that of magnesium electrode in 0.7molL−1 NaCl solution and the corrosion current density decreases with the following order: magnesium<magnesium–lithium–aluminum–cerium–yttrium<magnesium–lithium–aluminum–cerium. The magnesium–lithium–aluminum–cerium–yttrium anode is more active than magnesium–lithium–aluminum–cerium and magnesium. The magnesium–hydrogen peroxide semi-fuel cell with magnesium–lithium–aluminum–cerium–yttrium anode shows better performance than that with Mg–Li–Al–Ce and Mg.