In this paper, a tunnel-soil-surface structure system is taken as the research object, and shaking table tests of multidimensional near-field and far-field seismic waves are carried out to study the dynamic response law of the tunnel, the soil and the surface structure. The test results show that the response of the soil under the far-field seismic wave is relatively stronger, but due to the high-energy velocity pulse of the near-field seismic wave, the difference in acceleration response of the soil under near-field and far-field seismic waves gradually decreases as the input ground motion intensity increases. The existence of the tunnel causes the seismic response of the soil near the tunnel to be obviously different from that of the soil far away from the tunnel. After considering the vertical earthquake action, the acceleration response of the soil slightly increases. The surface structure-pile foundation has a certain influence on the seismic response of the middle section of the shallow tunnel. In addition, the input of vertical ground motion causes greater tensile strain in the tunnel. For the deformation of the surface structure, the period of acceleration response spectra of vertical ground motion close to the fundamental period of the structure in the vertical direction leads to a significant change in the vertical response, which is also the reason for the increase of the lateral deformation. The vertical seismic component has a significant influence on the dynamic response of the tunnel-soil-surface structure system, and the influence of vertical ground motion should be fully considered in seismic design.