The instability of underground spaces in abandoned coal mines with water-immersed rocks is one of the main hazards hindering the geothermal energy utilization and ecological restoration of post-mining areas. This study conducted graded cyclic loading-unloading tests of five groups of sandstone samples with different water contents. The evolution laws of input, elastic, dissipated, damping, and plastic energies were explored in detail, taking into account the damping effect. The normalized plastic energy was used to characterize the damage evolution of sandstone samples, which failure modes were analyzed from both macroscopic and microscopic perspectives. The X-ray diffraction technique and scanning electron microscopy were used to reveal the softening mechanism of sandstone's strength and elastic energy storage limit. The results showed that the graded cyclic loading's input, elastic, and dissipated energies increased gradually. The elastic energy share first increased and then stabilized, while dissipated energy share variation had the opposite trend. In each cycle, the input energy was primarily stored in the form of elastic energy, while the dissipated energy was mainly used to overcome the damping of sandstone. When the normalized number of cycles approached unity, the plastic energy share sharply increased, while that of the dampening energy featured an abrupt drop. Such change indicated an inevitable instability failure of the water-bearing sandstone. As the water content increased, the pore water exhibited more substantial lubrication, water-wedging, and dissolution effects on mineral particles. As a result, the latter obtained a round form, and the elastic energy storage limit of the sandstone decreased. When the water content was increased, the damage factor of sandstone after the same number of cycles increased at a relatively higher rate, and there was a transition of failure mode from brittle to ductile.