Heat stress (HS) causes significant economic losses and has become a continual challenge in the dairy industry worldwide. The objective of this study was to evaluate the effects of a dietary supplement on milk performance and immune function in late-lactation cows under HS conditions. The supplement was a fermented Chinese herbal medicines (CHMs) mixture consisting of 18 herbs. Forty lactating Holstein cows (560 ± 51.0 kg of initial BW, 230 ± 10.0 DIM, 16 ± 3.0 kg of milk per day) were randomly assigned into 4 treatment groups (10 cows per group). Each group was fed a dietary supplemented with 0, 25, 50, or 100 g CHMs per cow per day. Cows were housed at high ambient temperature-humidity index (average 74.5) for an experimental period of 42 d during the summer months. Milk yield, composition, immune responses involving blood lymphocyte apoptosis rate, serum biochemical parameters, and genes expression in lymphocytes were evaluated on days 14, 28, and 42, respectively. Results showed that milk yield, milk fat, and protein content were greater (all P < 0.05) for 50 or 100 g/d CHMs compared with the group without CHMs supplements throughout the experimental period. On the other hand, increasing CHMs dose demonstrated a greater lymphocyte or leukocyte count (P < 0.01). By flow cytometry analysis, early or late apoptosis rate of the lymphocytes was decreased (P < 0.05) by CHMs supplements. The immunity-related biochemistry and genes transcript responses involving cytokines (IL-1, IL-2, IL-6, and IL-12), apoptosis (Bak, Mcl-1, Bax, Bcl-2, Bcl-xl, and P53), and immunoglobulins (IgA, IgG, and IgM) were investigated. Compared with the unsupplemented group, the serum IL-2 and IL-6 levels, as well as IL-2 mRNA expression, increased (P < 0.05) for 100 g/d. However, the serum IL-1 level tended to decrease (P = 0.08) with increasing CHMs dose, and IL-1 mRNA expression was down-regulated (P = 0.02) by up to 24% for 100 g/d. Additionally, the serum Bax level decreased (P < 0.01) and Bcl-2 level increased (P = 0.01) for 100 g/d. Bax and Bak mRNA expressions were down-regulated (P < 0.05), and Bcl-2 and Bcl-xl expression were up-regulated (P < 0.05) for 50 or 100 g/d. The mRNA expressions of P53 and Mcl-1 were not affected by CHMs (P > 0.10). Besides, serum IgG levels were greater (P < 0.01) for 50 or 100 g/d, compared with unsupplemented group. In conclusion, CHMs supplements may improve milk performance and immune function in dairy cows under HS conditions.