Sugarcane is an economically important crop whose growth and carbon uptake play vital roles in the carbon cycle, food security, and global trade development. However, the response of the carbon uptake of sugarcane to climate variations and the influencing factors are still unclear. In this study, seven sugarcane plantation distribution maps during 2000 and 2018 in Guangxi, China, were generated using time series Landsat and Sentinel-2 imagery, and these maps were used to produce stable sugarcane sites by identifying pixels without land cover transformation. Time series gross primary production (GPP) and climate datasets were used to analyze the response of annual GPP to temperature, precipitation, and their interacting effects under different landforms (rugged ground and flat ground) and growing periods. The results showed a significantly positive correlation between annual GPP change and temperature variations. Extreme precipitation, including extreme drought and extreme wetness, caused the annual GPP to decrease sharply, except for extreme wetness in the early growing period. The decrease in annual GPP mainly appeared when extreme drought and hot conditions or extreme wet and cold conditions coexisted, ranging from −20.37% to −0.23%, while the increase in annual GPP especially appeared when non-extreme precipitation and high temperature co-occurred, ranging from 0.02% to 8.44%. In addition, the responses of sugarcane annual GPP change to extreme temperature and precipitation were significantly different between rugged and flat ground. Overall, this study indicated that spatiotemporal heterogeneities existed in the response of sugarcane carbon uptake to climate variations. In the future, effective measures should be adopted in sugarcane management and cultivation to reduce the negative effects of climate change on crop production. • Sugarcane’s carbon uptake response discrepantly to heat and water stresses. • Impacts of climate variations on sugarcane GPP varied with growing stages. • Rugged grounds change the response of sugarcane GPP to extreme climates.