Explosion venting is an effective method to reduce the explosion damage; in order to study the mechanism of an explosion venting process in internal and external space, this paper investigates the influence of vent parameters on hydrogen-air explosion in a rectangular duct through numerical simulation. The model including the internal and external space is first constructed, and then the explosion dynamic behaviors of the full flow field are analyzed under different vent pressures and sizes. The study aims to reveal the coupling effect of the flame, pressure, and flow field on hydrogen explosion venting. The results indicate that the explosion intensity increases with the growth of the vent pressure and the reduction of the vent size. The maximum external overpressure increases to 2.6 and 2.3 times as the vent pressure increased to 10 times or vent size reduced by 90%. The flame and combustible gas mixture evolve from a mushroom cloud into a jet form as the vent size decreases, and vortexes formed at the flame front suppress flame propagation. However, the flame speed increases significantly as the flame passes the vent under the impact of larger pressure gradient, which results in a more violent turbulence intensity and secondary external explosion.