The mycorrhizal symbiosis is ubiquitous in boreal forests. Trees and plants provide their fungal partners with photosynthetic carbon in exchange for soil nutrients like nitrogen, which is critical to the growth and survival of the plants. But plant carbon allocation to mycorrhizal symbionts can also fuel nitrogen immobilization, hampering tree growth. Here we present results from field and greenhouse experiments combined with mathematical modelling, showing that mycorrhizal fungi can be simultaneously mutualistic to an individual tree and parasitic to the networked community of trees. Mycorrhizal networks connect multiple plants and fungi, and we show that each tree gains additional nitrogen at the expense of its neighbors by supplying more carbon to the fungi. But this additional carbon supply eventually aggravates nitrogen immobilization in the shared fungal biomass. Individual trees may thus independently benefit from increasing their carbon investment to mycorrhiza, while causing a decline in nitrogen availability for the whole plant community. We illustrate the evolutionary underpinnings of this situation by drawing on the analogous the tragedy of the commons, and explain how rising atmospheric CO2 may lead to greater nitrogen immobilization in the future.