Taking a pipeline relocation project as an example, the Midas/GTS software is applied to simulate and analyze the stress-strain law of the slope soil body and the stability situation of the slope in the construction process of water supply pipeline, and the reasonable scheme of erecting the water supply pipeline is determined. The results show that the safety factor of slope decreases with the increase of the pier spacing of water supply pipeline. The distributional difference of soil stress and strain is larger if the pier spacing is different. But the influence of pier spacing on the stress of retaining wall is less. When considering the rainwater seepage action, the safety factor of the slope is greatly reduced, which provides the useful reference for the other similar slope projects.