Alhagi-honey (AH) is a well-established traditional ethnic medicine with advantageous effects against diarrhea and headaches. We aimed to explore the preventive effect of AH on liver damage induced by heat stress (HS) and its underlying mechanism. HS models were established by thermostat, and mice were treated at 39 ℃ for 10 h, lasting for 7 days. Hematoxylin–eosin (H&E) staining and Periodic Acid-Schiff (PAS) staining were used for histological observation, and transmission electron microscopy (TEM) was used for ultrastructure examination of hepatocytes. Gut microbiota (GM) composition and liver metabolites were respectively analyzed by 16S rRNA sequencing and non-targeted metabolome sequencing. AH pretreatment alleviated liver damage caused by heat stress in mice. The main manifestation was that AH alleviated serum aspartate transferase (AST) and aspartate transaminase (ALT). It was found that AH improved symptoms of hepatocyte damage. In addition, the relative abundance of f_Rikenellaceae, g_Incertae_Sedis and s_Staphylococcus_Orisratti, g_Lachnoclostridium, g_GCA-900066575, and s_Alistipes_inops were modified by AH and these bacterial genera showed association with 6 metabolites (2- (3,4-dihydroxyphenyl) acetamide, 3-hydroxy-3-methylpentanedioic acid, PC (17:0/17:1), Y-L-Glutamy-L-glutamic acid, L-Isoleucine, 5-Methyluridine, 8,8-dimethyl-2-phenyl-4H,8H-pyrano [2, 3-h] chromen-4-one). The Pearson analysis also showed a strong correlation between these microbes and 2 risk indicators (AST and ALT) of liver damage. AH alleviated HS-induced liver damage by regulating liver metabolism and maintaining normal GM. It demonstrated that AH held potential as a prophylactic drug for the prevention of HS-induced liver damage.