This study aimed to investigate the impact of dietary thiamine supplementation on milk production, rumen microbiota profile and inflammatory response of Hu ewes under heat-stress conditions. Twenty-seven multiparous pregnant and lactating Hu ewes of 71.6 ± 1.4 kg body weight, 11 ± 0.5 months gestation age, 31 ± 1 days in milk, 1.68 ± 0.15 L/d milk yield, and 2.14 ± 0.12 kg of daily dry matter intake (DMI), were used in the study. Following an acclimation period of 7 days, ewes were divided into 3 blocks of 9 each (one Hu ewe per pen), in a complete randomized design and assigned to one of three environmental temperature conditions for 15 days: thermoneutrality without supplementation (CON), heat-stressed without supplementation (HS) or heat-stressed with dietary thiamine supplementation (200 mg/kg of DMI; HST). The results indicated that the HS group experienced notable declines in milk protein, fat, and lactose content from day 10–15 (P < 0.05) compared to the CON group. In contrast, thiamine supplementation significantly elevated milk protein content from day 13–15 and raised milk fat and lactose content on days 14 and 15 (P < 0.05) compared to the HS group, thereby enhancing milk quality to a certain extent. Additionally, thiamine supplementation (HST group) significantly increased the circulating thiamine and Immunoglobulin A (IgA) concentrations accompanied by a significant decline in LPS-binding protein, interleukin-1 (IL-1), and serum amyloid A protein (SAA) levels compared to the HS group (P < 0.05). Rumen microbial composition analysis revealed that thiamine supplementation increased the abundance of Pyramidobacter, Butyrivibrio, Bacteroides, and Saccharofermentans. In conclusion, heat exposure during lactation in Hu ewes lowered milk production and quality, affecting rumen microbes. Dietary thiamine supplementation could improve rumen fermentation, mitigate heat stress-induced inflammation, and restore milk production in Hu ewes under heat stress conditions.