In order to study the influence of residual stress on the fatigue performance of welded structures, a thermo-elastoplastic finite element model was established based on the thermal coupling calculation method to simulate the temperature field and stress field during the whole T-joint welding process and the post-welding heat treatment process. Based on the extended finite element method, the numerical model of fracture mechanics of T-shaped welding joints was established. The initial condition of welding stress field was introduced into the model and its influence on the dynamic propagation behavior of fatigue cracks was analyzed. The results show that when residual stress is not taken into account, the fatigue crack of welding joint develops uniformly at both ends of the welding seam, and the crack propagation pattern is not consistent with the experiment. Post-welding heat treatment process can significantly reduce the high tensile stress and compression stress generated by welding, but the increase of fatigue life is small, only 6.1%; Considering the residual stress, the fatigue crack growth path is more similar to the experiment. The influence of welding residual stress on the fatigue crack growth path should be considered in the finite element simulation of welded structure.