Background: The aim of this study was to investigate the effects of alfalfa polysaccharides on the lactation performance and immune function of dairy cows. Methods: A total of 84 healthy Holstein cows were selected and randomly divided into 7 groups, including the control Group A0, the alfalfa polysaccharide groups (AP1, AP2, AP3) and the alfalfa extract groups (AE1, AE2, AE3). Each group had three replicates and each replicate had four cows. The daily rations of the dairy cows in the AP group and the AE group were supplemented with alfalfa polysaccharide powder and alfalfa extract at concentrations of 1, 2 and 3 kg/t, those in the A0 group served as a control. Result: (1) the milk production of dairy cows in the AE groups was extremely significantly greater (p less than 0.01) than that in A0 group and AP groups. The milk protein content of cows in the AP2 and AE2 groups was significantly greater (P less than 0.05) than that in the A0 group (2) The interleukin-2 (IL-2) levels in the serum of cows in the AP2, AP3, AE2 and AE3 groups were greater than those in the A0 and AP1 groups and the IgM antibody levels in the AP group and the AE group were extremely significantly greater than those in the A0 and AP1 groups (P less than 0.01). The IgA antibody level in the serum of dairy cows in the AP2, AP3, AE2 and AE3 groups was significantly (P less than 0.01) greater than that in the A0, AP1 and AE1 groups. In summary, the alfalfa extract improved both the lactation performance and immunity of dairy cows, indicating comprehensive effects. Alfalfa polysaccharides at a concentration of 2 kg/t improved the immunity of dairy cows.