In-situ thermal cycling neutron diffraction experiments were employed to unravel the effect of thermal history on the evolution of phase stability and internal stresses during the additive manufacturing (AM) process. While the fully-reversible martensite-austenite phase transformation was observed in the earlier thermal cycles where heating temperatures were higher than Af, the subsequent damped thermal cycles exhibited irreversible phase transformation forming reverted austenite. With increasing number of thermal cycles, the thermal stability of the retained austenite increased, which decreased the coefficient of thermal expansion. However, martensite revealed higher compressive residual stresses and lower dislocation density, indicating inhomogeneous distributions of the residual stresses and microstructures on the inside and on the surface of the AM component. The compressive residual stresses that acted on the martensite resulted preferentially from transformation strain and additionally from thermal misfit strain, and the decrease in the dislocation density might have been due to the strong recovery effect near the Ac1 temperature.