Purpose A 3D finite element (FE) model based on the double ellipsoidal heat source was developed to investigate the evolution of temperature and stress fields during the multilayer and multi-pass wire and arc additive manufacturing (WAAM) process. This paper aims to investigate the evolution of temperature and stress fields during the multilayer and multi-pass wire and arc additive manufacturing (WAAM) process by developing a 3D finite element (FE) model based on the double ellipsoidal heat source. Design/methodology/approach Experimental thermal cycle curves and residual stresses were obtained by thermocouples and X-ray diffraction, respectively. The validity of the model was verified by the corresponding experimental results. Findings The deposition process of the upper pass led to the partial remelting of the lower deposited pass. The thermal process of the current-deposited pass alleviated the stress concentration in the previous-formed passes. A more uniform temperature distribution could be obtained by using the reciprocating deposition path. Compared to the reciprocating deposition path, the peak values of the transverse and longitudinal tensile residual stresses of the deposited sample under the unidirectional deposition path were reduced by 15 MPa and increased by 13 MPa, respectively. The heat conduction in the deposited passes could be improved by extending the inter-pass cooling time appropriately. With an increase in the inter-pass cooling time, the longitudinal residual stress in the middle region of sample along longitudinal and transverse directions showed increase and decrease–increase trends, respectively, while the transverse residual stress exhibited decrease trend. Originality/value This study enhances the understanding of temperature and stress fields evolution during the multilayer and multi-pass cold metal transfer-WAAM processes of magnesium alloy and provides the reference for parameter optimization.