ABSTRACT Evaluation of the fire extinguishing capacity of homemade foams under different driving gases by thermogravimetric experiments. When the concentration of LS-99/SDS/isobutyl alcohol is 0.1%, the expansion ratio can be 52.54 times, 25% drainage time is 210s. Coal spontaneous combustion processes shift toward the high temperature region under the action of foam. The maximum mass loss velocity is reduced. Activation energy analysis shows that the composite inhibition rate of air foam is 64.56%, and nitrogen foam has a 28.18% increase compared to air foam. The heat release decreases under the action of air foam. The coal sample exhibits a heat absorption process in the presence of nitrogen foam. In addition, the mechanism of foam inhibition of coal spontaneous combustion was analyzed from physical and chemical perspectives. In summary, nitrogen foam is more effective than air foam in extinguishing spontaneous coal combustion processes.