It is known that the reaction rate of the thermal decomposition of polymer-bonded explosives exposed to cook-off has a certain relation with temperature, confining pressure and some other factors, which were verified by many experiments. Temperature-dominated thermal-decomposition models were developed for various high explosives and applied to study their decomposition process, such as HMX- and TATB-based polymer-bonded explosives. These models have reasonable accuracy. For example, the multistep thermal-decomposition model of PBX 9501 (which consists of 95% HMX, 2.5% Estane and 2.5% BDNPA/F) proposed by Tarver considers decomposition of both HMX and polymer binders. The temperature-dominated thermal-decomposition model only applies to preignition thermal decomposition. After ignition occurs, the dominant mechanism of the reaction transforms to deflagration and subsequent explosion, where the effect of pressure can no longer be neglected. Furthermore, the time scale of deflagration and explosion (millisecond or microsecond) differs significantly from the time scale of slow thermal decomposition (hours or minutes). The numerical model of postignition phenomenon (deflagration and final explosion) is still under investigation and is far from maturity. The predicted violence scale resulting from thermal explosion does not agree with experiment very well. An alternative method is to conduct a thermal–mechanical analysis for preignition stage, which takes advantage of a developed temperature-dominated thermal-decomposition model, and to analyze the stress caused by quasi-static thermal expansion. Herein, a thermal–mechanical analysis is implemented for a one-dimensional time-to-explosion experiment (ODTX) and a scaled thermal explosion experiment (STEX) with HMX-based polymer-bonded explosives inside using the finite element method. Then, the finite element model is applied to investigate the thermal decomposition of PBX 9501 inside an explosive device exposed to cook-off. The regions that have maximum temperature, maximum hydrostatic pressure and maximum von Mises stress are identified based on simulation results, which can benefit future improvement of the explosive device.