Cantharidin (CTD) serves as the principal bioactive compound in traditional Chinese medicine Mylabris, commonly employed in cancer treatment. Nevertheless, the clinical application of CTD is partly restricted by hepatotoxicity, and the toxicology mechanism is not fully elucidated. This study aims to explore the potential mechanism of CTD-induced hepatoxicity by targeted metabolomics-based UPLC-QTOF-MS/MS analysis and 16S rRNA sequencing. Studies have shown that the administration of CTD could lead to elevated serum biochemical indices including ALT and AST. Notably, dilatation of the liver central vein, hepatocellular necrosis, and slight vacuoles in rats were observed after CTD intervention. Fecal metabolomics found CTD could up-regulate 10 and down-regulate 33 metabolites, and metabolic pathway enrichment found that CTD could disrupt 2 metabolic pathways, including Arginine biosynthesis metabolism and β-Alanine metabolism. 16S rRNA gene sequencing analysis showed that CTD could increase the abundance of Turicibacter and Clostridium sensu stricto 1, but decrease the amounts of Prevotella 1. Our correlation analyses showed that alterations in the gut microbiota induced by CTD in rats may have impacted changes in the associated hepatic amino acid metabolism pathway. And the mechanism of action of CTD-induced hepatotoxicity may be related to inflammation, oxidative stress, impaired glucose metabolism and reduced hepatic glycogen storage. These findings will offer novel insights for the prevention and treatment of CTD-induced hepatotoxicity.