Abstract Through the analysis of gas pipeline leakage causes and gas leakage diffusion model, the preventive measures for gas leakage accidents are put forward, which is of great significance for the harm of gas leakage and explosion accidents. In this paper, the mathematical model of gas leakage is established through hydrodynamics and pipeline gas motion equation, and the leakage process is analyzed by means of numerical simulation, the change law of gas dynamic leakage is obtained from the aspects of gas leakage conditions, gas movement and diffusion law.