Liquid nitrogen (LN2) fracturing is beneficial to the development and utilization of geothermal energy. In this paper, the red sandstone was heated from room temperature to different temperatures (25°C-800°C) and then cooled with LN2. After attaining the room temperature, NMR, uniaxial compression, and acoustic emission (AE) tests were conducted, and results were compared for different samples. The results showed that with the increase in quenching temperature difference, the volume of micropores decreased gradually, while the volume of fine pores, mesopores, macropores and total porosity increased, resulting in the reduction of the compressive strength. Higher quenching temperature difference also reduced the sample’s total time to fail, and the failure mode was transformed from single inclined shear failure to conical failure. This is because the thermal stress (caused by the rapid cooling of LN2) expanded the original cracks of the sandstone, leading to high porosity and low compressive strength of the heat-treated and quenched samples.