The effects of small amounts of the rare-earth element erbium on the microstructure and the mechanical properties of AZ31 magnesium alloy via the electromagnetic stirring (EMS) process have been studied. It has been shown that AZ31-Er alloys are mainly composed of α-Mg solid solution and β-Mg17Al12 phases. When the Er content reaches 0.12 wt.%, the characteristic peaks of Al2Er can be observed. The microstructure is obviously refined and the tensile strength of the AZ31-based alloy at ambient temperature is significantly improved by contents of 0.03 wt.% Er, especially the elongation ( δ = 19%). More addition of Er obviously decreases the tensile strength and elongation of the AZ31-based alloy because of the grain coarsening and the reduction of β-Mg17Al12 phases.