This article aims to explore the impact of the punch structure (number of grooves, area ratio of grooves, depth of grooves and flaring angle) on the loading, torque and metal flow during the rotary extrusion (RE) process via finite element simulation (FEM) software. In order to further verify the simulation results, physical experiments were carried out and the microstructure of Mg-Gd-Y-Zn-Zr alloy after RE deformation was characterized and analyzed. The FEM results indicated that increasing the groove number will increase the amount of shear deformation and promote the metal at the bottom of the punch to flow rapidly to the cylinder wall. The increase in the groove depth would continue to reduce the forming load and increase the strain. However, if the groove depth exceeded 6 mm, an excessive flow-velocity difference would be formed, resulting in the formation of folding defects. The time of metal flow from the bottom of the punch to the cylinder wall would be shortened with the increase in flaring angle. Therefore, a groove number of 8, an area ratio of 64.49%, a groove depth of 6 mm and a flaring angle ranging from 7°to 9°were the optimal parameters of the punch structure to form the Mg-Gd-Y-Zn-Zr cylindrical parts via the RE technique. In addition, the cylinder parts could be formed with good quality according to the optimized FEM results. The cylinder wall from inner region to outer region exhibited gradient microstructure owing to the different metal flow and strain during the RE process.