Dietary fiber is a key nutritional regulatory factor that has been studied intensively for its role in improving reproduction in sows during gestation. However, the metabolic mechanism underlying the effect of interactions between metabolites and gut microbes on coarse feeding tolerance in indigenous sows remains to be elucidated. Therefore, the present study aimed to investigate the effects of dietary supplementation with alfalfa at different content ratios on the reproductive performance of pregnant Songliao Black sows. In total, 40 Songliao Black sows at 30 days of gestation were allocated to four treatments, which received the following diets: (1) a corn–soybean meal basal diet with no alfalfa meal (CON group), (2) a corn–soybean meal basal diet +10% alfalfa meal (Treatment 1 group), (3) a corn–soybean meal basal diet +20% alfalfa meal (Treatment 2 group), and (4) a corn–soybean meal basal diet +30% alfalfa meal (Treatment 3 group). Untargeted metabolomics, 16S rDNA sequencing, and enzyme-linked immunosorbent assay (ELISA) were performed to determine the possible effects of metabolites, the microbial communities in fecal samples and their functional potential, and the effects of dietary fiber on serum biochemical parameters, oxidative stress, and reproductive hormones in Songliao Black sows during gestation. The results revealed that the meals with 10 and 20% alfalfa had a beneficial effect on sows in terms of improving the reproductive performance of these sows. Bacterial 16S rDNA sequencing of the fecal samples revealed that the 10% alfalfa meal group had a higher α-diversity and higher abundance of probiotics. Bacteroidetes, Firmicutes, Proteobacteria, and Actinobacteria were revealed as the most abundant groups at the phylum level and Lactobacillus, Prevotella, Ruminococcus, Streptococcus, and Clostridium were the most abundant at the genus level in the sows fed with diets containing higher fiber levels. A total of 239 differential metabolites were identified in the sows fed with alfalfa meals. These metabolites were enriched mainly in the cAMP signaling pathway, biosynthesis of amino acids, and steroid biosynthesis. Pearson correlation analysis revealed significant positive correlations between Blautia and Daizein, Fibrobacter and 5-alpha-Cholestanone, Sphaerochaeta, Sutterella, and Metaraminol. Negative correlations were revealed between Sphaerochaeta and Erucic acid, Prevotellaceae and Harmaline, and Streptococcus and 5-alpha-Cholestanone. Collectively, these findings provide novel insights into the application of dietary fiber in sow diets.