To study the changing law of rock mechanics under different water conditions and to ensure that the water content was the sole factor, sandstone was used as the experimental material. Three different kinds of rock samples were prepared with different moisture states whose average saturation coefficients were 2.82%, 52.11%, 100%, i. e., dry, semi-saturated, and saturated. The mechanical properties of the rocks were dynamically tested under the action of static load and eight kinds of impact energy. The experimental results reveal that under static load, compared with dry rock, the stress-strain curves of half-saturated and saturated rock samples show decreasing peaks with increasing water content, and their compressive strengths decrease by 8.12% and 19.26%, respectively. Under dynamic loading, with increases in strain rate, the strengths of the three samples show a linear change in different degrees, the stress-strain curves shift to the right, and the peak values increase. The dry and water-bearing rocks exhibit two obviously different trends in the unloading stage, especially in the second stage of unloading. Also, under the same impact energy, as the water content of the rock increases, the degree of fragmentation also increases.