Soil contains more carbon than the atmosphere and vegetation combined. Understanding the mechanisms controlling the accumulation and stability of soil carbon is critical to predicting the Earth’s future climate. Recent studies suggest that decomposition of soil organic matter is often limited by nitrogen availability to microbes and that plants, via their fungal symbionts, compete directly with free-living decomposers for nitrogen. Ectomycorrhizal and ericoid mycorrhizal (EEM) fungi produce nitrogen-degrading enzymes, allowing them greater access to organic nitrogen sources than arbuscular mycorrhizal (AM) fungi. This leads to the theoretical prediction that soil carbon storage is greater in ecosystems dominated by EEM fungi than in those dominated by AM fungi. Using global data sets, we show that soil in ecosystems dominated by EEM-associated plants contains 70% more carbon per unit nitrogen than soil in ecosystems dominated by AM-associated plants. The effect of mycorrhizal type on soil carbon is independent of, and of far larger consequence than, the effects of net primary production, temperature, precipitation and soil clay content. Hence the effect of mycorrhizal type on soil carbon content holds at the global scale. This finding links the functional traits of mycorrhizal fungi to carbon storage at ecosystem-to-global scales, suggesting that plant–decomposer competition for nutrients exerts a fundamental control over the terrestrial carbon cycle.