Abstract Failure caused by stress corrosion cracking (SCC) is inevitable during the long-term service of nuclear power pipe welds. This is mainly due to the propagation of microcracks in the deposited metal, which seriously affects the operation safety of nuclear power pressure pipes. Overlay welding is practical for pressure pipe repair welding, which can introduce compressive residual stress inside the weld seam. In this work, a diagonal T-pipe joint was fabricated using tungsten inert gas arc welding with ERRS-3 wire, and an overlay weld was also fabricated using tungsten inert gas arc welding with ERRS-3 wire under circumstances of water in the pipe and no water in the pipe. And then the contour method and finite element method were employed to measure and calculate the residual stress distribution in the diagonal T-pipe joint. Both results showed that overlay welding can introduce compressive residual stresses into the pipe joint. The compressive residual stress zone area inside the weld seam with water in the pipe is larger than that without water in the pipe, and the compressive residual stress zone area varies at different positions of the weld seam. This work is expected to promote the application of overlay weld technology in the diagonal T-shaped pipe joint repair and prevent stress corrosion crack propagation of nuclear power pipe welds.