In order to ensure the safe and stable gas supply, in view of the city gas pipeline corrosion leakage situation of Taiyuan city gas company, a statistical analysis on the natural gas pipeline network leakage after transformation was carried out, most of the company gas was cast iron pipe, the cause of corrosion after replacement was explored, according to analysis of pipeline leak, the corresponding measures and preventive measures were formulated, which could control the gas leakage and achieve the effect of preventing production safety accidents.