To investigate the effect of power density on the residual stress distribution on the surface of 17-7 PH stainless steel welded joints during laser shock process, we utilized ABAQUS finite element software for analyzing its distribution under different laser shock power densities. The material was tested for residual stress using an X-ray stress diffractometer to verify the accuracy of the simulation results and lay the foundation for finding the optimal process parameters. The simulation results show that when the laser power density is 2.79 GW/cm2, the maximum residual compressive stress value on the surface of the sample after laser shock peening is −37.2 MPa; When the laser power density is 2.79 GW/cm2, the maximum residual compressive stress value on the surface of the sample is −94.1 MPa; When the power density reaches 5.17 GW/cm2, the maximum residual stress value on the surface of the laser shock peening sample is −144.8 MPa, and residual stress cavity is formed. The experimental results show that when the laser power density is 2.79 GW/cm2, the maximum residual compressive stress on the surface of the sample is −37.3 MPa; When the power density is 3.98 GW/cm2, the uniformity of compressive stress distribution on the surface of the sample is optimal, with a maximum residual compressive stress value of −99.0 MPa; When the power density is 5.17 GW/cm2, the maximum residual compressive stress value is −146.1 MPa, and residual stress cavity is formed on the material surface. The simulation results are close to the experimental results, and the model error ranges from 0.2% to 4.9%. The simulation results are accurate and reliable.