The osmolyte glycine betaine (GB) ranks among the few widespread biomolecules in all three domains of life. In corals, tissue concentrations of GB are substantially higher than in the ambient seawater. However, the synthetic routes remain unresolved, questioning whether intracellular GB originates from de novo synthesis or heterotrophic input. Here we show that the genomic blueprint of coral metaorganisms encode the biosynthetic and degradation machinery for GB. Member organisms also adopted the prokaryotic high-affinity carrier-mediated uptake of exogenous GB, rendering coral reefs potential sinks of marine dissolved GB. The machinery metabolizing GB is highly expressed in the coral model Aiptasia and its microalgal symbionts, signifying GB's role in the cnidarian-dinoflagellate symbiosis. We estimate that corals store between 106–109 grams of GB globally, representing about 16% of their nitrogen biomass. Our findings provide a framework for further mechanistic studies addressing GB's role in coral biology and reef ecosystem nitrogen cycling.