Subclinical ketosis (SCK) in periparturient cows is associated with gut microbiota dysbiosis and energy metabolism disorders. Although in vitro studies show that free fatty acids (FFA) and BHB impair polymorphonuclear neutrophil (PMN) functions-potentially causing secondary infections-limited in vivo evidence exists. Astragalus polysaccharides (APS) modulate metabolism, immunity, and gut microbiota, but their effects on PMN functions and gut microbiota in SCK cows remain unclear. This study aims to evaluate PMN dysfunction and gut microbiota dysbiosis in SCK cows, and clarify the protective effects of APS on these parameters. Multiparous cows were classified into control (CON; n = 40) and SCK (n = 38) groups based on serum BHB levels. Compared with CON cows, SCK cows exhibited reduced feed intake, negative energy balance (NEB), and dysfunctional PMN activation-characterized by inhibited phagocytosis/neutrophil extracellular traps (NET) and enhanced respiratory burst/degranulation. Supplementation with APS restored PMN functional balance (increasing phagocytosis and reducing respiratory burst/degranulation) and alleviated NEB. Subclinical ketosis decreased gut microbiota α- and β-diversity without altering dominant phyla. At the genus level, SCK reduced Monoglobus, Faecalibacterium, Ruminococcus (short-chain fatty acid [SCFA]-producers), and increased Prevotella and Parabacteroides. Astragalus polysaccharides reversed these changes. Serum FFA and BHB negatively correlated with Monoglobus and Ruminococcus, whose decline likely contributed to NEB. Polymorphonuclear neutrophil reactive oxygen species and serum myeloperoxidase levels negatively correlated with Faecalibacterium, Ruminococcus, and Monoglobus. The predicted microbial community function also showed a decrease in the levels of propanoate and butanoate metabolism in SCK cows, suggesting that deficiency of SCFA-producing microbiota likely promoted PMN hyperactivation in SCK. Our study identifies a microbiota-energy metabolism-immunity pathway disrupted by SCK in periparturient cows. Astragalus polysaccharide supplementation restores this pathway by normalizing gut microbiota, alleviating NEB, and correcting PMN dysfunction. This work provides mechanistic insights into metabolic-immune disorders and validates APS as a natural intervention to improve dairy cow health during the critical transition period.