• The soil parameters are used as the input values of the numerical model. • The variation law of slope stability is explained by permeability characteristics. • Due to the hysteresis effect, the safety factor remains constant within a certain range. In practical engineering, slopes are in rainfall-evaporation environments over long periods. Considering the dry-wet cycles effect on unsaturated loess slope instability is of great significance. In this paper, a soil–water characteristic curve test of unsaturated loess is carried out. Combined with the prediction model, the curve between the volumetric water content and unsaturated permeability coefficient is obtained, and the obtained curve is used as the material assignment condition for slope stability analysis. The results show that dry-wet cycles affect slope stability by changing the volumetric water content and unsaturated loess permeability coefficient of unsaturated loess. The more dry-wet cycles there are, the larger the unsaturated permeability coefficient. With increasing volumetric water content, the slope stability decreases. Under the same dry-wet cycle conditions, the greater the rainfall intensity and the longer the rainfall duration, the easier the slope is to be unstable. The influence of the dry-wet cycle effect on the slope stability is weakened with an increasing number of cycles. When more than 5 dry-wet cycles are carried out, the slope safety factor tends to be stable.