To study the failure of red sandstone under extremely high stress during the service life of tunnels, an in-depth study was conducted on the mechanical properties of red sandstone under uniaxial loading and cyclic loading and unloading processes at different pH values using the AG-250kNIS electronic precision material testing machine and MTS815 mechanical testing machine. The results show that as the acidity and alkalinity increase, the peak stress under uniaxial loading decreases and the axial strain increases,The peak stress at failure is 9.40, 12.37, 7.18, and 5.36 MPa, respectively, accounting for 74.19%, 68.91%, 40.38%, and 36.21% of the uniaxial compressive strength; The number of cycles significantly decreases during cyclic loading and unloading fatigue failure, and the stress required for sandstone failure gradually decreases. The peak strength and elastic modulus of sandstone show a decreasing trend, indicating that the hydrochemical environment plays an accelerating role in rock degradation. During the cyclic loading and unloading process of sandstone, there is a continuous increase in dissipated energy and finally a sudden increase, the Ud/U and Ue/U ratios at the peak point of sandstone in the natural state are 0.399 and 0.601, respectively, while the overall elastic energy shows an increasing trend; and a damage evolution model was established based on dissipative energy, which can better describe the degradation process of red sandstone.