Changes in vegetation productivity (GPP) have an important impact on the global carbon cycle. Gansu is located in the arid and semi-arid region in northwest China, and its ecological environment is fragile. The study of the impact of drought on GPP is of great significance to the global ecosystem carbon cycle. Based on the SPEI index in Gansu from 2000 to 2020, this paper analyzed the changing characteristics of drought and its impact on GPP. The results revealed that: (1) In the past 21 years, the annual SPEI-12 has been increasing at a rate of 0.3/10a, and it was divided into two distinct dry and wet stages. Before 2018, it was mainly dry, after 2018, it was mainly humid. SPEI-3 decreased at a rate of 0.1/10a in spring, fluctuated significantly in summer, and increased in autumn and winter.(2) The annual SPEI-12 of most meteorological stations was less than 0, the SPEI value increased from northwest to southeast. Except for summer, the SPEI-3 value varied greatly in other seasons, increasing from west to east in spring, decreasing from south to north in autumn, and decreasing from west to east in winter.(3) GPP displayed a significant increasing trend (R2 = 0.57, p < 0.01) in Gansu from 2000 to 2020 .The spatial variation increased from northwest to southeast.(4) Annual SPEI-12 was positively correlated with GPP, SPEI-3 was negatively correlated with GPP in spring and autumn, and positively correlated in summer and winter. The correlation between SPEI-3 and GPP in summer passed the significance test.