In order to solve the problem of "potpourri" of safety risk prevention and control measures, which is caused by the unclear mechanism of the spatial effect of coal mine safety level heterogeneity and its influencing factors. This paper discriminates the dominant factors of spatio-temporal heterogeneity of coal mine safety production level in China and their spatial effect types by means of GeoDetector and the Spatial Dubin Model (SDM), specifies the categories and degrees of acts on local and surrounding areas by changes in indicators, and provides further visualization of the detection outcomes with the assistance of the Neo4j graph database, and the findings indicate that:(1) All 15 indicators selected in the study have a certain influence on the generation of spatial heterogeneity in China's coal mine safety production level, and all of them show an enhancement relationship after the interaction of indicators. Especially, the combination of excavated environment and other indicators basically has a non-linear enhancement relationship. (2) In terms of spatial effects, the influence of the 5 effects on the spatio-temporal heterogeneity of coal mine safety level is, in descending order, industrial development effect > capital allocation effect > production environment effect > government supervision effect > enterprise management effect, which indicates that macroeconomic and market conditions have a much stronger influence on the generation of spatio-temporal heterogeneity in coal mine production safety status. (3) From the single indicator perspective, the average annual temperature, average annual wind speed, coal consumption and monitoring efficiency primarily affect the dependent variable through direct effects; GDP per capita, average labor compensation as well as railroad operating mileage have positive spatial spillover on the changes of coal mine safety production level in surrounding areas; the evaluation of the spatial effect for average labor compensation exhibits a positive indirect effect with low influence; for the two indicators of production efficiency and ex-factory price, not only do they have negative effects on the local coal mine safety level, but also have significant spillover effects on surrounding areas.