The inuence of equal channel angular pressing and rotary swaging on the microstructure and corrosion resistance was investigated in three magnesium alloys with the addition of aluminum, lithium and rare earth elements AE21, AE42 and LAE442. The processing resulted in grain renement in all cases; nevertheless, the eect on the corrosion resistance was ambiguous. A continuous increase of the polarization resistance during the gradual equal channel angular pressing was observed in the AE42 and LAE442 alloys, whereas there was almost no eect in the AE21 alloy. The rotary swaging of AE42 resulted in a decrease of polarization resistance. The increase of polarization resistance in the alloys with the higher concentration of alloying elements was caused by the combined eect of grain renement and better dispersion of particles in the matrix thanks to shear deformation during equal channel angular pressing. In the AE42 alloy, the increase of the corrosion resistance after equal channel angular pressing was also proven by chemical analysis of the solution and acoustic emission detection. This benecial eect was not observed when the concentration of alloying elements was lower or when the deformation mode was dierent from shearing.