Damage mechanisms are a key factor in materials science and are essential for understanding and predicting the behavior of materials under complex loading conditions. In this paper, the influence of different directions, different rates and different model parameters on the mechanical behavior of AZ31 magnesium alloy during the tensile process is investigated based on the secondary development of the VUMAT user subroutine based on the GTN damage model and verified by the tensile experiments at different loading rates and in different directions. The results show that AZ31 magnesium alloy exhibits significant differences in mechanical properties in radial and axial stretching, where the yield strength is lower in the radial direction than in the axial direction, and the elongation is the opposite. Moreover, the maximum stress and elongation of the material decreased with the increasing tensile rate, revealing the importance of the loading rate on the material properties. Compared with the existing studies, this paper determines the GTN model parameters of the AZ31 magnesium alloy extruded state bar by theresponse surface method combined with the optimization algorithm and obtains the parameter set that can accurately describe the damage behavior of this material. The study also found that the nucleation-averaged plastic strain (εN) has the most significant effect on the maximum stress and fracture point of the stress–strain curve by the sensitivity analysis of six key parameters of the GTN model, while the other parameters change the shape of the curve and the local features to different degrees. Further analysis shows that the differences in yield strength and elongation can be attributed to the differences in basal slip, twinning behavior and dynamic recrystallization in the microstructure, which provides an important guidance for the optimization of the microstructure of AZ31 magnesium alloy. This study not only reveals the influence law of loading conditions on the mechanical properties of AZ31 magnesium alloy but also provides a theoretical basis and reference for understanding the damage mechanism of magnesium alloy and optimizing its mechanical properties.