Zooxanthellae, endosymbiotic algae of reef-building corals, substantially contribute to the high gross primary production of coral reefs, but corals exude up to half of the carbon assimilated by their zooxanthellae as mucus. Here we show that released coral mucus efficiently traps organic matter from the water column and rapidly carries energy and nutrients to the reef lagoon sediment, which acts as a biocatalytic mineralizing filter. In the Great Barrier Reef, the dominant genus of hard corals, Acropora, exudes up to 4.8 litres of mucus per square metre of reef area per day. Between 56% and 80% of this mucus dissolves in the reef water, which is filtered through the lagoon sands. Here, coral mucus is degraded at a turnover rate of at least 7% per hour. Detached undissolved mucus traps suspended particles, increasing its initial organic carbon and nitrogen content by three orders of magnitude within 2 h. Tidal currents concentrate these mucus aggregates into the lagoon, where they rapidly settle. Coral mucus provides light energy harvested by the zooxanthellae and trapped particles to the heterotrophic reef community, thereby establishing a recycling loop that supports benthic life, while reducing loss of energy and nutrients from the reef ecosystem.