The mechanical properties of rocks weaken under dry–wet cycles. This weakening may significantly modify the safety reserve of underground caverns or reservoir bank slopes. However, meso‐damage has not been carefully studied based on micromechanical observations and analyses. Therefore, in this study, meso‐damage of a yellow sandstone is investigated and a meso‐damage‐based constitutive model for dry–wet cycles is proposed. First, computed tomography scanning and uniaxial compression tests were conducted on yellow sandstones under different dry–wet cycles. Second, the evolution of rock mesostructures and the damage mechanism subjected to dry–wet cycles were simulated using the discrete element method with Particle Flow Code in 2 Dimensions (PFC2D) software. Third, a constitutive model was proposed based on the meso‐statistical theory and damage mechanics. Finally, this constitutive model was verified with the experimental results to check its prediction capability. It is found that the radius and number of pore throats in the sandstone increase gradually with the number of dry–wet cycles, and the pore structure connectivity is also improved. The contact force of sandstone interparticle cementation decreases approximately linearly and the continuity of the particle contact network is continuously broken. The meso‐deformation and strength parameters show similar declining patterns to the modulus of elasticity and peak strength of the rock sample, respectively. This meso‐damage‐based constitutive model can describe well the rock deformation in the initial pressure density stage and the damage stage under the coupling effect of dry–wet cycles and loads.