Hydraulic fracturing is a key technology in the development of unconventional oil and gas reservoirs. With the continuous industrialization and large-scale development of shale gas production in China, the workload of hydraulic fracturing is also increasing rapidly, and the induced seismic events are also increasing gradually, resulting in different degrees of damage to the surrounding ancillary buildings. In order to study the impact of hydraulic fracturing on ancillary buildings, the finite element software ABAQUS was used to establish a three-dimensional model of middle and high-rise isolated structures to simulate the earthquake triggered by hydraulic fracturing. Then, considering the SSI (soil-structure interaction) effect of soil-based structure, the nonlinear dynamic response of the structure under the action of ground motion was analyzed. Through the adoption of different types of soil and the foundation depth, the influence of various parameters is discussed. The study found that in the case of not considering SSI, basal shear force, and displacement between floors of the seismic-isolation structure significantly greater than considering SSI, using hard soil layer, base shear displacement is greater than the soft soil layer and interlayer, shows that due to the effect of hydraulic fracturing, making fluid diffusion in soil, the seismic energy dissipation effect. It is also found that the period, base shear, peak displacement, and interlayer displacement of deep foundation pit are increased compared with shallow foundation pit considering SSI effect.