In order to investigate the impact of moisture content on energy evolution, three types of rock samples with varying moisture contents were subjected to uniaxial compression tests. The study aimed to analyze the reasons behind the differences in energy during the deformation process of rocks with different moisture contents. The findings indicate that with increasing moisture content, the peak strength and elastic modulus of the samples decrease. However, the ratio of crack initiation strength σci to peak strength σf shows little effect, primarily because the characteristic strength ratio σci/σf is determined by external loads. The growth rate of elastic energy reaches its maximum value in the early stage of yield, while the proportion of elastic energy reaches its peak value in the later stage of yield. In the deformation and failure process of rocks with varying moisture contents, the increment in elastic performance is smallest in the initial compaction stage for saturated rocks, whereas it is the largest in the yield stage for dry rocks. Additionally, a damage evolution equation based on energy dissipation was established and validated.