Long-distance oil and gas pipelines are inevitably impacted by rockfalls during geologic hazards such as mud-rock flow and landslides, which have a serious effect on the safe operation of pipelines. In view of this, an experimental and numerical study on the strain behavior of buried pipelines under the impact load of rockfall was developed. The impact load exerted on the soil, and the strains of buried pipeline caused by the impact load were theoretically derived. A scale model experiment was conducted using a self-designed soil-box to simulate the complex geological conditions of the buried pipeline. The simulation model of hammer-soil-pipeline was established to investigate the dynamic response of the buried pipeline. Based on the theoretical, experimental, and finite element analysis (FEA) results, the overall strain behavior of the buried pipeline was obtained and the effects of parameters on the strain developments of the pipelines were analyzed. Research results show that the theoretical calculation results of the impact load and the peak strain were in good agreement with the experimental and FEA results, which indicates that the mathematical formula and the finite element models are accurate for the prediction of pipeline response under the impact load. In addition, decreasing the diameter, as well as increasing the wall thickness of the pipeline and the buried depth above the pipeline, could improve the ability of the pipeline to resist the impact load. These results could provide a reference for seismic design of pipelines in engineering.