In the process of processing, the residual stress in the deformed component will play a crucial role in the assembly and future use. This paper analyzes the deformation behavior of martensite phase transition induced by deformation through unidirectional stretching. The martensite phase variables and residual stress distributions after stretching were measured. The calculation model of residual stress distribution is established considering the phase change factors. It provides a theoretical basis for the calculation of phase transition behavior and residual stress distribution in the complex deformation process. A dynamic model based on stress and strain was established under different conditions, and the realization of martensite transformation was added to the finite element software with the help of secondary development subroutine. By comparing with the test data, the results show that the distribution pattern of residual stress can better reflect the residual stress after deformation under the consideration of the phase transformation of martensite.