Cyclic extrusion compression (CEC) is an effective severe plastic deformation (SPD) process which can be used for fabricating ultrafine grained light materials such as magnesium alloys. This method introduces three-dimensional compression and shear stresses and the process can be repeated for a certain number of passes until the desired accumulated strain has been introduced. In order to reveal the effect of second phases on the microstructure developed in magnesium alloys during CEC, three different alloys (AZ31, AZ31-1wt.%Si and AZ91) were investigated after CEC 7 passes performed at 225°C. The experimental results show that the CEC process can effectively refine the microstructures of these alloys and the mean grain size achieved is 1.3µm, 1.5µm and 1.4µm, respectively. It is revealed that the grain size, grain shape and grain boundary structures are little affected by coarse phase Mg2Si but strongly affected by the fine phase Mg17Al12. The fine phase Mg17Al12 seems to increase the relative grain misorientations, hence enhancing the formation of high angle grain boundaries (HAGBs). It is expected that such changes are improving mechanical properties, subsequent forming behavior and surface quality.