With the large-scale development of urban underground space, foundation pit engineering has become one of the important geotechnical engineering topics in urban construction. In this paper, the effects of foundation pit excavation and precipitation on adjacent buildings are studied in detail. The main research work includes the following aspects: summarizing and analyzing the soil consolidation theory, foundation pit excavation, and precipitation process; the influencing factors of the adjacent soil layer displacement; the influence mechanism and influence types of foundation pit excavation and precipitation on adjacent buildings. The finite element model considering the whole process of foundation pit excavation is established, and the variation law of the upper layer displacement around the foundation pit is analyzed. The deformation law of the retaining structure, the calculation results of precipitation and nonprecipitation, and different excavation methods will be analyzed and compared. The calculation results show that the displacement of the soil layer around the foundation pit is also different between different excavation methods. As the distance between the foundation pits increases, the lateral displacement of the underground continuous wall near the frame structure gradually decreases. The distance from the foundation pit wall is 30 m. The maximum value of the lateral shift is reduced by 4.7% compared with 5 m. The foundation pit is studied, as well as the law of internal force variation of adjacent buildings caused by digging and precipitation, and checking the safety and adaptability of structural members. The calculation results show that a large additional internal force will be generated on the bottom floor of the adjacent building, and some structural members will be damaged by the bearing capacity.