Previous earthquake damage studies have shown that loess has strong seismic vulnerability under strong earthquakes, and the water pipelines buried in loess are prone to engineering disasters due to displacement around the soil. Therefore, it is necessary to study and analyze the deformation law of the loess layer with buried pipelines under earthquake. In this paper, based on the actual project of the water pipeline Hanjiang-to-Weihe River Water Diversion Project, using FLAC3D finite difference software, taking vertical dynamic displacement, dynamic stress, and dynamic acceleration as indexes, the deformation law of loess layer with water pipeline buried under earthquake is studied. The results show that: With the continuous attenuation of seismic wave energy, the dynamic displacement of the model gradually increases from bottom to top, and the maximum displacement is located at the top of the model. After the earthquake, the soil showed obvious uneven settlement, and the uneven settlement gradually decreased with the increase of soil depth. The overall dynamic stress of the model shows a trend of decreasing from top to bottom. Based on the above analysis results, this paper studies the influence of five factors, such as seismic amplitude, Young’s modulus of soil, cohesion, internal friction angle, and pipeline radius, on the seismic subsidence of loess with buried pipelines. The results show that the primary and secondary order of factors influencing seismic subsidence of loess is seismic amplitude, cohesion, internal friction angle, pipeline radius, and Young’s modulus.