Objective: The objective of this study was to reveal the influence of acute and chronic heat stress (HS) on the abundance and function of rumen microbiome and host metabolism.Methods: Forty mid-lactation goats were randomly divided into two artificial environments: control group and heat-stressed group. This study was recorded from two periods, 1 day and 28 days. The first day was defined as control 1 (CT1) and HS 1 (acute HS), and the last day was defined as CT28 and HS28 (chronic HS). On the first and last day, 6 dairy goats in each group were randomly selected to collect rumen liquid after the morning feeding through oral stomach tubes. The barn temperature and humidity were recorded every day.Results: Disruption of the rumen microbiome was observed under chronic HS, represented by an increase in the abundance of <i>Prevotella</i> and <i>Bacteroidales</i> (p<0.05), and upregulation of carbohydrate transport and metabolism functions (p<0.05). Additionally, the abundance of <i>Succinimonas</i> and <i>Ruminobacter</i> in chronic HS is lower than in acute HS (p<0.05), and the functions of intracellular trafficking, secretion and vesicular transport, and the cytoskeleton were downregulated (p<0.05).Conclusion: The HS affected the interaction between the microbiota and host, thereby regulated milk production in dairy goats. These findings increased understanding of the crosstalk between hosts and bacteria.