The mechanical properties and microstructure of the cemented paste backfill (CPB) in dry–wet cycle environments are particularly critical in backfill mining. In this study, coal gangue, fly ash, cement, glass fiber, and nano-SiO2 were used to prepare CPB, and dry–wet cycle tests on CPB specimens with different curing ages were conducted. The compressive, tensile, and shear strength of CPB specimens with different curing ages under different dry–wet cycles were analyzed, and the microstructural damage of the specimens was observed by scanning electron microscopy (SEM). The results show that compared with the specimens without dry–wet cycles, the uniaxial compressive strength, tensile strength, and shear strength of the specimens with a curing age of 7 d after seven dry–wet cycles were the smallest, being reduced by 40.22%, 58.25%, and 66.8%, respectively. After seven dry–wet cycles, the compressive, tensile, and shear strength of the specimens with the curing age of 28 d decreased slightly. The SEM results show that with the increasing number of dry–wet cycles, the internal structure of the specimen becomes more and more loose and fragile, and the damage degree of the structural skeleton gradually increases, leading to the poor mechanical properties of CPB specimens. The number of cracks and pores on the specimen surface is relatively limited after a curing age of 28 d, while the occurrence of internal structural damage within the specimen remains insignificant. Therefore, the dry–wet cycle has an important influence on the both mechanical properties and microstructure of CPB. This study provides a reference for the treatment of coal-based solid waste and facilitates the understanding of the mechanical properties of backfill materials under dry–wet cycling conditions.