Gut hormones are not only able to regulate digestive, absorptive, and immune mechanisms of the intestine through biological rhythms, but impact the host through their interactions with intestinal microorganisms. Whether hormones in ruminal fluid have an association with the ruminal ecology is unknown. Objectives of the study were to examine relationships between the diurnal change in ruminal hormones and microbiota in lactating cows, and their associations in vivo and in vitro. For the in vivo study, six cows of similar weight (566.8 ± 19.6 kg), parity (3.0 ± 0.0), and milk performance (8,398.7 ± 1,392.9 kg/y) were used. They were adapted to natural light for 2 weeks before sampling and fed twice daily at 07:00 a.m. and 14:00 p.m. Serum, saliva, and ruminal fluid samples were collected at 02:00, 10:00, and 18:00 on the first day and 06:00, 14:00, and 22:00 on the second day of the experimental period. The concentrations of melatonin (MLT), growth hormone (GH), and prolactin (PRL) were measured via radioimmunoassay, whereas amplicon sequencing data were used to analyze relative abundance of microbiota in ruminal fluid. JTK_CYCLE analysis was performed to analyze circadian rhythms of hormone concentrations as well as the relative abundance of microbiota. For the in vitro study, exogenous MLT (9 ng) was added into ruminal fluid incubations to investigate the impacts of MLT on ruminal microbiota. The results not only showed that rumen fluid contains MLT, but the diurnal variation of MLT and the relative abundance of 9% of total rumen bacterial operational taxonomic units (OTUs) follow a circadian rhythm. Although GH and PRL were also detected in ruminal fluid, there was no obvious circadian rhythm in their concentrations. Ruminal MLT was closely associated with Muribaculaceae, Succinivibrionaceae, Veillonellaceae, and Prevotellaceae families in vivo. In vitro, these families were significantly influenced by melatonin treatment, as melatonin treatment increased the relative abundance of families Prevotellaceae, Muribaculaceae while it reduced the relative abundance of Succinivibrionaceae, Veillonellaceae. Collectively, ruminal microbes appear to maintain a circadian rhythm that is associated with the profiles of melatonin. As such, data suggest that secretion of melatonin into the rumen could play a role in host-microbe interactions in ruminants. © Copyright © 2021 Ouyang, Wang, Bu, Ma, Liu, Xue, Du, Aboragah and Loor.