Interactions between Sphagnum (peat moss) and cyanobacteria play critical roles in terrestrial carbon and nitrogen cycling processes. Knowledge of the metabolites exchanged, the physiological processes involved, and the environmental conditions allowing the formation of symbiosis is important for a better understanding of the mechanisms underlying these interactions. In this study, we used a cross-feeding approach with spatially resolved metabolite profiling and metatranscriptomics to characterize the symbiosis between Sphagnum and Nostoc cyanobacteria. A pH gradient study revealed that the Sphagnum–Nostoc symbiosis was driven by pH, with mutualism occurring only at low pH. Metabolic cross-feeding studies along with spatially resolved matrix-assisted laser desorption/ionization mass spectrometry imaging (MALDI-MSI) identified trehalose as the main carbohydrate source released by Sphagnum, which were depleted by Nostoc along with sulfur-containing choline-O-sulfate, taurine and sulfoacetate. In exchange, Nostoc increased exudation of purines and amino acids. Metatranscriptome analysis indicated that Sphagnum host defense was downregulated when in direct contact with the Nostoc symbiont, but not as a result of chemical contact alone. The observations in this study elucidated environmental, metabolic, and physiological underpinnings of the widespread plant–cyanobacterial symbioses with important implications for predicting carbon and nitrogen cycling in peatland ecosystems as well as the basis of general host-microbe interactions.