Surface mechanical attrition treatment (SMAT) was used to generate a gradient microstructure in commercial grade magnesium. Positron annihilation lifetime spectroscopy and variable energy positron beam measurements, as well as microhardness tests, electron backscatter diffraction, X-ray diffraction, and electrochemical corrosion tests, were used to investigate the created subsurface microstructure and its properties. It was found that SMAT causes an increase in dislocation density and grain refinement which results in increased hardness of the subsurface zone. The mean positron lifetime values indicate trapping of positrons in vacancies associated with dislocations and dislocation jogs. The increase of the SMAT duration and the vibration amplitude influences the depth profile of the mean positron lifetime, which reflects the defect concentration profile. Electrochemical measurements revealed that the structure induced by SMAT increases the susceptibility of magnesium to anodic oxidation, leading to the enhanced formation of hydroxide coverage at the surface and, as a consequence, to the decrease in corrosion current. No significant effect of the treatment on the residual stress was found.