Groundwater affects ecosystem services (ES) by altering critical zone ecohydrological and biogeochemical processes. Previous research has demonstrated significant and nonlinear impacts of shallow groundwater on ES regionally, but it remains unclear how groundwater affects ES at the global scale and how such effects respond to environmental factors. Here, we investigated global patterns of groundwater relationships with two ES indicators—net primary productivity (NPP) and soil organic carbon (SOC)—and analyzed underlying factors that mediated groundwater influences. We quantitatively compared multiple high-resolution (∼1 km) global datasets to characterize water table depth (WTD), NPP and SOC, and performed spatial simultaneous autoregressive modeling to test how selected predictors altered WTD-NPP and WTD-SOC relationships. Our results show widespread significant WTD-NPP correlations (61.5% of all basins globally) and WTD-SOC correlations (64.7% of basins globally). Negative WTD-NPP correlations, in which NPP decreased with rising groundwater, were more common than positive correlations (62.4% vs. 37.6%). However, positive WTD-SOC relationships, in which SOC increased with rising groundwater, were slightly more common (53.1%) than negative relationships (46.9%). Climate and land use (e.g., vegetation extent) were dominant factors mediating WTD-NPP and WTD-SOC relationships, whereas topography, soil type and irrigation were also significant factors yet with lesser effects. Climate also significantly constrained WTD-NPP and WTD-SOC relationships, suggesting stronger WTD-NPP and WTD-SOC relationships with increasing temperature. Our results highlight that the relationship of groundwater with ES such as NPP and SOC are spatially extensive at the global scale and are likely to be susceptible to ongoing and future climate and land-use changes.