Corn and soybean meal are the two main components in formula feed of farm animals, leading to a serious food competition between humans and livestock. An alternative may be to encourage the utilization of unconventional feedstuff in animal diet. In the current study, we evaluated the utilization of fermented alfalfa meal (FAM) in weaned pigs. Twenty weaned piglets (separately caged) were randomly divided into two groups. Pigs in the control group (CON) were fed corn-soybean meal diet, and part of corn and soya protein concentrate in the diet of another group was replaced by 8% FAM. After 40 days of feeding, the average feed intake of FAM pigs was increased (P > 0.05), and the villus height (VH) of jejunum and duodenum, crypt depth (CD), and VH/CD in FAM pigs was improved compared to the CON group (P < 0.05). The increase (P < 0.05) of goblet cells in the jejunum of FAM pigs was positively correlated with the expression of MUC-2 gene (R = 0.9150). The expression of genes related to immunity (IRAK4, NF-κB, and IL-10) and intestinal barrier (Occludin and MUC-2) in the jejunum, as well as the expression of ZO-1 and MUC-2 in the colon of these pigs, also showed increase (P < 0.05) compared to CON pigs, which was accompanied by the decrease (P < 0.05) of LPS concentration in the serum. The elevated proportion of CD3+ and CD8+ T-lymphocyte subsets in spleen (P < 0.05) confirmed the improvement of systemic immune function in FAM pigs. In addition, FAM pigs have a higher β-diversity of microbial community (P < 0.05) and promoted enrichment of probiotics such as Lactobacillus that positively was correlated with acetate concentration in the colon over CON pigs. In summary, partially replacement of expanded corn and soya protein concentrate with FAM (8%) may benefit the intestinal barrier and immune function of weaned pigs without affecting their growth. Our findings also provide evidence of the feasibility of FAM as a dietary component in pigs to reduce the consumption of grain.