Friction stir processing (FSP) followed by aging treatment is used to modify the microstructure and improve the mechanical properties of the as-cast AE42 rare earth-containing magnesium alloy. FSP results in grain refinement and microstructural homogenization. The grain size decreases from 81 to 7.4 μm because of continuous dynamic recrystallization. After FSP, basal texture forms, and Mg17Al12 and Al11RE3 phases disappear, while a new Al2RE phase appear. After aging treatment, precipitation of Al2RE phase appears and the intensity of texture reduce. Tensile properties of the FSP specimens exhibit an anisotropy obviously before and after the aging. Deformation mechanism of the FSP specimens follows the dislocation basal slip and the extension twin. Factors influencing strength of the as-cast AE42 Mg alloy are (a) secondary phases, (b) texture and (c) grain size.