The frequent occurrence of extreme climate events disrupts the regional water budget balance and leads to changes in the dry and wet conditions of the surface, making the water surplus and deficit more complex and variable. To explore the quantitative relationship between the spatiotemporal evolution of dry and wet conditions and meteorological factors in the Hexi Corridor under changing environmental conditions, the relative moisture index (MI) and FAO Penman–Monteith (FAO P–M) model were combined to construct a partial differential quantitative attribution model for dry and wet variations affected by climate factors in the Hexi Corridor. The results show that: (1) MI in the Hexi Corridor increased significantly (Z = 2.341) during 1960–2019, showing a wet-trend change, and the degree of drought increased from southeast to northwest in the Hexi Corridor. (2) The order of drought degree in four seasons is as follows: winter (− 0.95), spring (− 0.93), autumn (− 0.89) and summer (− 0.83). (3) The frequency of extreme drought, severe drought, moderate drought, and mild drought within 60 years of 21 meteorological stations accounted for 28.38%, 50.48%, 8.85%, and 7.38%, respectively, and the frequency above severe drought was the highest. (4) The sensitivity of meteorological factors gradually increased from northwest to southeast, and MI was the most sensitive to the change of precipitation (P), followed by net radiation (Rn), wind speed (u2), mean temperature (Tmean), relative humidity (RH) and maximum temperature (Tmax). MI was the least sensitive to the change of minimum temperature (Tmin). P is the most important meteorological variable that contributes to the increase of MI, followed by u2, Tmean, and Tmin. Rn, Tmax, and RH have the least influence, and the total contribution of the seven meteorological factors is 85.59%. Compared with the reference evapotranspiration, P is the main factor affecting the dry and wet variations in Hexi Corridor.