In Holstein cows, β-casein, one of the most critical proteins in milk, exists in two main genotypes, A1 and A2. Herein, 45 Holstein cows [categorized into three groups based on β-casein A1A1, A1A2, and A2A2 genotypes (N = 15)] with the same feeding management and litter size were enrolled to explore differences in rumen microflora and metabolites across various β-casein genotypes. Rumen fluids were collected for metagenomics and metabolomics analyses. Metabolomics and weighted gene co-expression network analysis (WGCNA) revealed that arachidonic acid (AA), adrenic acid (AdA), glycocholic acid (GCA), and taurocholic acid (TCA) were significantly and positively correlated with milk fat % in dairy cows (p