Ecosystem reliance on groundwater, defined here as water stored in the saturated zone deeper than one meter beneath the surface, has been documented in many semi-arid, arid, and seasonally-dry regions around the world. In California, groundwater sustains ecosystems and mitigates mortality during drought. However, the effect of groundwater on carbon cycling still remains largely unresolved. Here we use 20 years of eddy covariance, groundwater, and tree growth measurements to isolate the impact of groundwater on carbon cycling in a semi-arid Mediterranean system in California during the summer dry season. We show that daily ecosystem groundwater use increases under positive groundwater anomalies and is associated with increased carbon assimilation and evapotranspiration rates. Negative groundwater anomalies result in significantly reduced ecosystem groundwater uptake, gross primary productivity, and evapotranspiration, with a simultaneous increase in water use efficiency. Three machine learning algorithms better predict gross primary productivity and tree growth anomalies when trained using groundwater data. These models suggest that groundwater has a unique effect on carbon assimilation and allocation to woody growth. After controlling for the effect of soil moisture, which is often decoupled from groundwater dynamics at the site, wet groundwater anomalies increase canopy carbon assimilation by 179.4 ± 25.7 g C m−2 (17 % of annual gross primary productivity) over the course of the summer season relative to dry groundwater anomalies. Similarly, annual tree growth increases by 0.175 ± 0.035 mm (17.7 % of annual growth) between dry and wet groundwater anomalies, independent of soil moisture dynamics. Our results demonstrate the importance of deep subsurface water resources to carbon assimilation and woody growth in dryland systems, as well as the benefits of collocated, long-term eddy covariance and ancillary datasets to improve understanding of complex ecosystem dynamics.