To investigate and compare the gut microbiota structure in complete intensive feeding pattern (CP) and extensive feeding pattern (EP) groups, a total of 20 pigs were divided into two groups and fed the same diet. The fecal microbial composition was profiled using 16S rRNA gene sequencing. Our results showed that seventeen predominant genera were present in each pig sample and constituted a phylogenetic core microbiota at the class level. Most of the core microbial flora was significantly higher in the CP group than the EP group ( P < 0.05), while Gammaproteobacteria was significantly lower in the CP group than in the EP group ( P < 0.05). The CP group had significantly higher community diversity, richness, and evenness than the EP group ( P < 0.05). Functional prediction indicated that intestinal microbial species might lead to higher growth and an increased fat accumulation capacity in the CP group; however, disease resistance was weaker in the CP group than the EP group. In conclusion, EP pigs have a wider range of sports venues and better animal welfare than CP pigs, which helps reduce the occurrence of diseases and neurological symptoms. To explore the effect of intestinal flora on the disease resistance of pigs at the molecular level, Coprococcus, which has the key gut bacterium in the intestine, was selected for isolation and purification, and co-cultured with intestinal epithelial cells. The qPCR was used to determine the effect of Coprococcus on SLA-DRB gene expression in intestinal epithelial cells. The results showed that Coprococcus enhance SLA-DRB gene expression in intestinal epithelial cells. The results provided useful references for further study on the relationship between intestinal flora and pig disease resistance.