At present, most underground gas inspection robots use lifting mechanism or fixed probe to sense gas environment, which influences robot's driving flexibility, and due to the limitation of robot body mechanism, most inspection robots can only detect local gas environment information within sensors installation range, and lack of gas concentration detection in any cross-sectional space of the roadway. In view of the above problems, an intelligent detection system of gas environment in roadway of coal mine inspection robot based on gas diffusion model was designed. The system is based on theory of gas diffusion, combined with gas environment characteristics of coal mine roadways, and introduces influence of wall rock, wind speed and gas diffusion coefficient on gas diffusion model, and establishes a gas diffusion optimization model in roadway by using virtual image source method and BP neural network intelligent algorithm optimized by genetic algorithm. The environmental information such as gas concentration at any point of the inspection robot in the moving process is obtained by the sensor detection system, and the gas diffusion optimization model is substituted to solve the optimal gas diffusion coefficient. The gas concentration distribution at the corresponding point can be calculated and solved by inputting the coordinate position of a certain point in the roadway. With movement of the robot, the gas concentration distribution data on different coal mine roadway sections under its displacement path can be obtained. The experimental results show that the system can calculate gas concentration at any point on any cross-section of the roadway that meets the detection error requirements, and achieve dynamic real-time detection; it overcomes limitations of traditional coal mine roadway gas detection methods. Using inspection robots to replace the manual inspection of coal mine gas can provide a new idea and method for intelligent detection of gas in coal mines.