Mine fires are one of the common major disasters in underground mining. In addition to the external fire sources generated by mining equipment and mechanical and electrical equipment during operations, coal is exposed to air during mining, and spontaneous combustion is also the main cause of mine fires. In order to reduce the hidden danger of coal mines caused by spontaneous coal combustion during lignite mining, the microbial inhibition of coal spontaneous combustion is proposed in this paper. Via SEM, pore size analysis, and NMR and FT-IR experiments, the mechanism of coal spontaneous combustion is discussed and revealed. The modification of lignite before and after the addition of retardants is analyzed from the perspective of microstructure, and the change in flame retardancy of the lignite treated with two retardants compared with raw coal is explored. The results show that, compared with raw coal, a large number of calcium carbonate particles are attached to the surface of the coal sample after bioinhibition treatment, and the total pore volume and specific surface area of the coal sample after bioinhibition treatment are decreased by 68.49% and 74.01%, respectively, indicating that bioinhibition can effectively plug the primary pores. The results of NMR and Fourier infrared spectroscopy show that the chemical structure of the coal sample is mainly composed of aromatic carbon, followed by fatty carbon and carbonyl carbon. In addition, the contents of active groups (hydroxyl, carboxyl, and methyl/methylene) in lignite after bioretardation are lower than those in raw coal, and methyl/methylene content is decreased by 96.5%. The comparison shows that the flame-retardant performance of biological retardants is better than that of chemical retardants, which provides an effective solution for the efficient prevention and control of spontaneous combustion disasters in coal mines.