Nowadays, melatonin, previously considered only as a pharmaceutical product for rhythm regulation and sleep aiding, has shown its potential as a co-adjuvant treatment in intestinal diseases, however, its mechanism is still not very clear. A firm connection between melatonin at a physiologically relevant concentration and the gut microbiota and inflammation has recently established. Herein, we summarize their crosstalk and focus on four novelties. First, how melatonin is synthesized and degraded in the gut and exerts potentially diverse phenotypic effects through its diverse metabolites. Second, how melatonin mediates the activation and proliferation of intestinal mucosal immune cells with paracrine and autocrine properties. By modulating T/B cells, mast cells, macrophages and dendritic cells, melatonin immunomodulatory involved in regulating T-cell differentiation, intervening T/B cell interaction and attenuating the production of pro-inflammatory factors, achieving its antioxidant action via specific receptors. Third, how melatonin exerts antimicrobial action and modulates microbial components, such as lipopolysaccharide, amyloid-β peptides via nuclear factor κ-light-chain-enhancer of activated B cells (NF-κB) or signal transducers and activators of transcription (STAT1) pathway to modulate intestinal immune function in immune-pineal axis. The last, how melatonin mediates the effect of intestinal bacterial activity signals on the body rhythm system through the NF-κB pathway and influences the mucosal epithelium oscillation via clock gene expression. These processes are achieved at mitochondrial and nuclear levels to control the host immune cell development. Considering unclear mechanisms and undiscovered actions of melatonin in gut-microbiome-immune axis, it's time to reveal them and provide new insight for the outlook of melatonin as a potential therapeutic target in the treatment and management of intestinal diseases.