To overcome the short inhibition life of currently available inhibitors, a high polymer nanocomposite inhibitor was developed. The spontaneous combustion characteristics of coal gangue from the Yangquan mining area were studied through proximate analysis, scanning electron microscope/energy dispersive spectrometer (SEM/EDS), and thermogravimetric analysis. As a result, the coal gangue was found to be prone to spontaneous combustion. Temperature‐programmed oxidation experiments showed that the average inhibition rates of Ca (OH)2 or polyacrylamide (PAM) were 30.99% and 30.95%, respectively. During testing, when the temperature of the coal gangue exceeded 160°C, the CO production and oxygen consumption rate of the sample with PAM increased dramatically, proving that the PAM inhibition effect was short‐lived with elevating temperature, whereas the inhibition rate of polyacrylamide/montmorillonite (PAM/MMT) was significantly increased to 47.70%. In addition, the CO production and oxygen consumption rates were significantly reduced in the late oxidation period, proving that the addition of MMT was able to effectively improve the high‐temperature resistance of the PAM. Different concentrations of PAM/MMT were compounded with Ca (OH)2, further improving the inhibition effect of the treatment. The inhibition effect of the PAM/MMT 3%‐Ca (OH)2 20% composite inhibitor was the best in the study, with an inhibition rate of 83.15%.