The high-strength red sandstone in its natural state is subjected to significant strength deterioration under alternating wet and dry conditions, which can cause many catastrophic problems in the process of engineering construction. It is important to deeply understand the damage mechanism of red sandstone under the action of dry and wet cycles. Therefore, this paper explores the mechanism of red sandstone’s uniaxial deformation and failure through indoor uniaxial compression tests, studies the damage to the microstructure of red sandstone under wet–dry cycles using scanning electron microscopy, and establishes a damage variable based on fractal dimension. The results show that with the increase of wet–dry cycles, the peak stress of red sandstone shows a decreasing trend, and the minimum peak stress is 17.3 MPa, which is a 46.62% decrease compared to the sample with 0 wet–dry cycles. During the wet–dry cycle process, there are four deformation characteristics of red sandstone samples, namely, crack compression, crack extension, progressive fracture, and crack penetration. SEM images show that the porosity, pore area, and fractal dimension all show a nonlinear increase, and the maximum damage variable can reach 10.41%. The research results can provide guidance for engineering design and slope failure mechanism research in red sandstone areas.