Accurately quantifying the impact of climatic and anthropogenic factors on vegetation change is critical for developing and evaluating ecological management strategies. However, most presented studies typically ignore the climate temporal effects and assume that all pixels are affected by both climate change (CC) and human activities (HA), which often introduce uncertainties. In this study, Leaf area index (LAI), temperature, precipitation, solar radiation, and land cover data from 1982 to 2020 were used to detect and attribute vegetation dynamics in China. We used partial correlation analysis, generalize linear model, trend analysis, and improved RESTREND to analyze the spatiotemporal variation characteristics of vegetation LAI from 1982 to 2020 and to quantify the effects of CC and HA on vegetation dynamics since the implementation of the Grain for Green Project (GGP). The results indicate that significant vegetation greening appeared in most areas (66.2%) between 2000 and 2020. Both CC and HA have positive effects on vegetation greening. In arid and semi-arid regions, precipitation was the primary driver of vegetation change, while in high-latitude areas of southern and southwestern China, temperature was the primary determinant. After considering the temporal effects, the explanatory power of climate variables for vegetation dynamics increased by 4.0% compared to ignoring the temporal effects, accounting for 72.81%. After dividing the pixels into those affected by CC and those affected by both CC and HA, the contribution of HA was decreased from 31.19% to 25.96%. Although the contribution of HA is lower than that of CC, ecological engineering has effectively promoted vegetation greening. These research findings provide scientific data and theoretical basis for ecological environment protection and natural resource management.