In this study, we investigated the correlation between the composition and function of the gut microbiota and the semen quality of Rongchang boars. Significant differences in gut microbial composition between boars with high (group H) and low (group L) semen utilization rates were identified through 16S rRNA gene sequencing, with 18 differential microbes observed at the genus level. Boars with lower semen utilization rates exhibited a higher relative abundance of Treponema, suggesting its potential role in reducing semen quality. Conversely, boars with higher semen utilization rates showed increased relative abundances of Terrisporobacter, Turicibacter, Stenotrophomonas, Clostridium sensu stricto 3, and Bifidobacterium, with Stenotrophomonas and Clostridium sensu stricto 3 showing a significant positive correlation with semen utilization rates. The metabolomic analyses revealed higher levels of gluconolactone, D-ribose, and 4-pyridoxic acid in the H group, with 4 pyridoxic acid and D-ribose showing a significant positive correlation with Terrisporobacter and Clostridium sensu stricto 3, respectively. In contrast, the L group showed elevated levels of D-erythrose-4-phosphate, which correlated negatively with Bifidobacterium and Clostridium sensu stricto 3. These differential metabolites were enriched in the pentose phosphate pathway, vitamin B6 metabolism, and antifolate resistance, potentially influencing semen quality. These findings provide new insights into the complex interplay between the gut microbiota and boar reproductive health and may offer important information for the discovery of disease biomarkers and reproductive health management.