To study the thermal cracking characteristics and mechanism of sandstone after high-temperature treatment, the pore size distribution and micromorphology of sandstone were observed by nuclear magnetic resonance and scanning electron microscopy. Then, based on the Weibull distribution theory, a thermal elastic mechanical model of random heterogeneous rock was established for the rock unit, the thermal stress distribution characteristics of sandstone were analyzed, and the thermal fracture mechanism of rock was discussed. The results show that the porosities of the samples increased with increasing temperature and the proportion of large pores increased significantly when exceeded 400 C. Particularly when reached 1000 C, thermal cracking was distributed in a complex network. Additionally, different rock units are in different thermal stress states, which leads to the regional differences in the distribution of rock thermal fracture. When exceeded 400 C, there were obvious thermal cracks near the outer edge that weakened the mechanical properties of rock.