Gas explosion is one of the five major hazards in mines, with about 36% of such incidents occurring in the excavation working face. Therefore, to investigate the impact of gas explosion propagation laws within excavation roadways, we conducted a simulation analysis of parameters such as peak of explosion overpressure, peak rate of pressure rise, and flame propagation speed in the presence of a Tunnel Boring Machine (TBM). In the presence of the TBM, the explosion overpressure approximately doubles, and the flame propagation speed also greatly increases, exacerbating the explosion hazard. Thus, when investigating gas explosion laws within excavation roadways, the presence of a TBM emerges as a significant factor that cannot be overlooked. Furthermore, an analysis of the effects of methane concentration and gas accumulation length on explosion parameters was conducted. The results indicate that when the flame passes through the TBM baffle, the average flame propagation speed increases the most when the methane concentration is 9.5%, increasing by about 6 times. In addition, as the gas accumulation length increases, both explosion overpressure and flame propagation speed gradually increase. Additionally, TBM has a certain impact on flame propagation and methane dissipation.