BACKGROUNDIntestinal barrier dysfunction and systemic inflammation are common in obstructive sleep apnoea (OSA). We aimed to investigate the role of melatonin, an anti-inflammatory mediator, in mediating the relationships between OSA, intestinal barrier dysfunction and systemic inflammation.METHODSTwo hundred and thirty-five male participants who complained with sleep problems and underwent whole night polysomnography at our sleep centre between 2017 and 2018 were enrolled. Polysomnographic data, anthropometric measurements and biochemical indicators were collected. Serum melatonin, intestinal barrier function biomarker zonula occludens-1 (ZO-1) and inflammatory biomarkers C-reactive protein (CRP) with lipopolysaccharide (LPS) were detected. Spearman's correlation analysis assessed the correlations between sleep parameters, melatonin and biomarkers (ZO-1, LPS and CRP). Mediation analysis explored the effect of OSA on intestinal barrier dysfunction and systemic inflammation in moderate-severe OSA patients.RESULTSAs OSA severity increased, serum melatonin decreased, whereas ZO-1, LPS and CRP increased. Spearman's correlation analysis showed that serum melatonin was significantly negatively correlated with ZO-1 (r = -0.19, p < .05) and LPS (r = -0.20, p < .05) in the moderate-OSA group; serum melatonin was significantly negatively correlated with ZO-1 (r = -0.46, p < .01), LPS (r = -0.35, p < .01) and CPR (r = -0.30, p < .05) in the severe-OSA group. Mediation analyses showed melatonin explain 36.12% and 35.38% of the effect of apnoea-hypopnea index (AHI) on ZO-1 and LPS in moderate to severe OSA patients.CONCLUSIONSOur study revealed that melatonin may be involved in mediating intestinal barrier dysfunction and systemic inflammation in moderate-to-severe OSA patients.