Hyperactivation of hypothalamic–pituitary–adrenal (HPA) axis and hypothalamic–pituitary–thyroid (HPT) axis were found in acute high altitude challenge, but the role of gut microbiota and metabolites is unknown. We utilized adult male Sprague–Dawley rats at a simulated altitude of 5500 m for 3 days in a hypobaric-hypoxic chamber. ELISA and metabolomic analyses of serum and 16S rRNA and metabolomic analyses of fecal samples were then performed. Compared with the normoxic group, serum corticotropin-releasing hormone (CRH), adrenocorticotropic hormone (ACTH), corticosterone (CORT), and thyroxine (tT4) were increased in the hypoxia group, whereas thyrotropin-releasing hormone (TRH) was decreased. Bacteroides, Lactobacillus,Parabacteroides,Butyricimonas,SMB53,Akkermansia,Phascolarctobacterium, and Aerococcus were enriched in hypoxia group, whereas [Prevotella], Prevotella,Kaistobacter,Salinibacterium, and Vogesella were enriched in normoxic group. Metabolomic analysis indicated that acute hypoxia significantly affected fecal and serum lipid metabolism. In addition, we found five fecal metabolites may mediate the cross-talk between TRH, tT4, and CORT with [Prevotella], Kaistobacter,Parabacteroides, and Aerococcus, and 6 serum metabolites may mediate the effect of TRH and tT4 on [Prevotella] and Kaistobacter by causal mediation analysis. In conclusion, this study provides new evidence that key metabolites mediate the cross-talk between gut microbiota with HPA and HPT axis under acute hypobaric hypoxia challenge.