Under the same seismic load, different local topography will have different effects, which is an important research field in seismic engineering. Hills are connected with valleys is a very typical terrain. Taking this terrain as an example, its response to the most destructive SH waves in the earthquake is studied. By simplifying and dividing the model, the wave functions satisfying the wave equation and boundary conditions in each region are constructed by using the complex function and moving coordinate method. The equations satisfying the boundary continuity conditions are established. With the help of calculation software, the numerical results are obtained. The influence of different parameters on ground motion is discussed.