Climate change is causing more frequent and intense heatwaves. Therefore, it is important to understand how heatwaves affect the terrestrial carbon cycle, especially in grasslands, which are especially susceptible to climate extremes. This study assessed the impact of naturally occurring, simultaneous short-term heatwaves on CO2 fluxes in three ecosystems on the Mongolia Plateau: meadow steppe (MDW), typical steppe (TPL), and shrub-grassland (SHB). During three heatwaves, net ecosystem productivity (NEP) was reduced by 86 %, 178 %, and 172 % at MDW, TPL, and SHB, respectively. The changes in ecosystem respiration, gross primary production, evapotranspiration, and water use efficiency were divergent, indicating the mechanisms underlying the observed NEP decreases among the sites. The impact of the heatwave in MDW was mitigated by the high soil water content, which enhanced evapotranspiration and subsequent cooling effects. However, at TPL, insufficient soil water led to combined thermal and drought stress and low resilience. At SHB, the ecosystem's low tolerance to an August heatwave was heavily influenced by species phenology, as it coincided with the key phenological growing phase of plants. The potential key mechanism of divergent NEP response to heatwaves lies in the divergent stability and varying importance of environmental factors, combined with the specific sensitivity of NEP to each factor in ecosystems. Furthermore, our findings suggest that anomalies in soil environment, rather than atmospheric anomalies, are the primary determinants of NEP anomalies during heatwaves. This challenges the conventional understanding of heatwaves as a discrete and ephemeral periods of high air temperatures. Instead, heatwaves should be viewed as chronologically variable, compound, and time-sensitive environmental stressors. The ultimate impact of heatwaves on ecosystems is co-determined by a complex interplay of environmental, biological, and heatwave features.