Globally, reef-building corals are the most prolific producers of dimethylsulphoniopropionate (DMSP), a central molecule in the marine sulphur cycle and precursor of the climate-active gas dimethylsulphide. At present, DMSP production by corals is attributed entirely to their algal endosymbiont, Symbiodinium. Combining chemical, genomic and molecular approaches, we show that coral juveniles produce DMSP in the absence of algal symbionts. DMSP levels increased up to 54% over time in newly settled coral juveniles lacking algal endosymbionts, and further increases, up to 76%, were recorded when juveniles were subjected to thermal stress. We uncovered coral orthologues of two algal genes recently identified in DMSP biosynthesis, strongly indicating that corals possess the enzymatic machinery necessary for DMSP production. Our results overturn the paradigm that photosynthetic organisms are the sole biological source of DMSP, and highlight the double jeopardy represented by worldwide declining coral cover, as the potential to alleviate thermal stress through coral-produced DMSP declines correspondingly.