In underground engineering such as mining and tunnel excavation, the rock mass is often subjected to repeated loading and unloading stress environments. Herein, true triaxial cyclic loading and unloading tests are carried out on fine sandstone and medium-fine sandstone specimens with cracks of different angles. The test results show that the mechanical properties of fine sandstone and medium-fine sandstone samples show obvious differences, and the crack angle has a significant effect on the mechanical properties of the sandstone specimen. During the experimentation, the expansion phenomenon of medium-fine sandstone is more obvious than that of fine sandstone, and its brittleness is also weaker. The damage law of the sample has nothing to do with the type of sandstone. The damage caused by the stress in the σ 1 direction varies linearly with the cumulative damage of the specimen, however, the damage caused by the directions of σ 2 and σ 3 grow nonlinearly in terms of the cumulative damage of the specimen. The hysteretic loop dissipated energy of the same type of sandstone specimens at different angles are dissimilar, and the dissipated energy increases with the increase of the crack angle. Based on the equivalent irreversible strain and the hysteretic loop dissipated energy, the damage law of the rock strength is analyzed. The obtained results reveal that the index based on the equivalent irreversible strain is helpful in exploring the damage degree of rock in the initial stage of cyclic loading and unloading. Furthermore, the damage index established based on the energy dissipation concept is beneficial to predicting the damage and failure law of rock in the advanced stage of loading.