To explore the influence of local void of foundation beam under moving load, model experiments were carried out, and the dynamic response of beams considering local void was obtained using DIC technology. The impact of various parameters on the response of beams was then examined. In addition, by using the separated variable approach, the free vibration mode control equation was calculated, and the dynamic response control equation of the foundation beam with local void under moving load was established. The locally void foundation beam's free vibration frequency and mode expression were then determined analytically. Next, the mode superposition approach was applied to determine the steady-state response analytical solution of the locally void foundation beam under moving load. The accuracy of the analytical model was verified through comparison with experimental results. Lastly, analytical equations were used to investigate the effects of void length, sectional bending stiffness of the beam, foundation elasticity stiffness, and load movement speed on the dynamic response of foundation beams. The results show that the foundation beam's natural frequency is directly impacted by the sectional flexural stiffness, void length and foundation stiffness, and the void length will also affect the excitation frequency. When the excitation frequency approaches the natural frequency, the dynamic response of the beam will rapidly increase. In addition, even when there is a large difference between the excitation frequency and the natural frequency, high-order resonance and cancellation phenomena still occur. The effect of void length on beam deformation is significant, with a deformation increase of 400–500 % when the ratio of void length to beam thickness increased from 1.25 to 7.5. Raising the foundation's stiffness can lessen the beam's distortion, but after it reaches a certain point (over 70 MPa), changes in the foundation's stiffness have minimal impact on the beam's deformation.