Flammable gas leaked from pipelines is easy to cause explosion accident. The consequences of accident are amplified in strongly constrained environments near the pipelines. In this paper, a gas leakage and explosion accident in Beijing is analyzed using field investigation and relevant experimental analysis techniques, and the complete investigation process of accident cause based on physical evidence is displayed. Some theoretical analysis models are introduced to explore the causes of this type of accident from a system perspective. The laws of explosion damage of building structures in strongly constrained environments are also summarized. The results indicate that the gas leaked from the end of the hose was excited by an electric spark in the electrical box causing this explosion and a gas explosion with a TNT equivalent of 2.73–4.28 kg is sufficient to damage a large number of walls of civilian buildings. The pressure difference between the two sides of structures and the duration are decisive factors in the degree of damage. Cause analysis shows that human error needs to be avoided through education and supervision. The study can provide theoretical references for the investigation of explosion accidents, as well as improvement of energy management system.