The mycotoxin ochratoxin A (OTA) is a widespread contaminant in human and animal food products. Previous studies in rats revealed that melatonin (Mel) exhibits a preventive effect against OTA-induced oxidative stress in liver. However, it remains unknown whether gut microbiota respond to Mel and, if so, whether it can prevent OTA-induced inflammation and mitophagy in the liver. In the present study, mice received an oral gavage of Mel and OTA for 3 weeks before harvesting colonic digesta and liver tissue for analyses. In another study, the role of intestinal microbiota on the effects of Mel on OTA-induced liver inflammation and mitophagy was assessed through clearance of intestinal microbiota with antibiotics followed by gut microbiota transplantation (GMT). Oral Mel supplementation ameliorated mitophagy in the liver and reversed gut microbiota dysbiosis. Intriguingly, in antibiotic-treated mice, Mel and OTA failed to induce mitophagy in the liver. Using the GMT approach in which mice were colonised with intestinal microbiota from control-, OTA-, or Mel + OTA-treated mice led us to elucidated the involvement of intestinal microbiota in liver inflammation and mitophagy induced by OTA. The findings suggested that intestinal microbiota play some role in the Mel-induced amelioration of liver inflammation and mitophagy induced by OTA.