Heat and drought events are increasing in frequency and intensity, posing significant risks to natural and agricultural areas with uncertain effects on the net ecosystem CO2 exchange (NEE). We modified the Vegetation Photosynthesis and Respiration Model to include soil moisture impacts on the gross ecosystem exchange (GEE) and respiration (RECO) fluxes and determine the temporal variability of NEE over south-western Europe for 2001-2022. Warming temperatures lengthen growing seasons causing an increase in GEE which is mostly compensated by a similar increment in RECO, resulting in a modest annual increase of net carbon sink of 0.80 gC/m2year but with high spatial and annual variability. The heatwave of 2022 reduced NEE by 78.5 TgC, a 27% decrease from the mean. The interannual variability is more influenced by drought in temperate humid regions than in Mediterranean semi-arid regions. These results emphasize the vulnerability of the net carbon sink as drying trends could revert the NEE trends, as it is happening for croplands in the French Central Massif.