Pigs are widely used as animal models in various studies related to humans. The interaction between the gut microbiota and the host has significant effects on the host's health and disease status. However, although there have been many studies investigating the pig gut microbiota, the findings have been inconsistent due to variations in rearing conditions. Interactions between the gut microbiota and host have not been fully explored in pigs. Specific pathogen-free (SPF) pigs are ideal non-primate large animals to study the interactions between the gut microbiota and the host. In this study, we performed high-throughput sequencing analysis of the gut microbiota and the gut tissue transcriptome of six SPF pigs to provide a systematic understanding of the composition, function, and spatial distribution of gut microbiota in SPF pigs. We identified significant differences in microbial diversity and functionality among different gastrointestinal tract sites. Metagenomics data analysis revealed significant differences in alpha diversity and beta diversity of microbiota in different gastrointestinal sites of SPF pigs. Additionally, transcriptomic data indicated significant differences in gene expression as well as KEGG and GO functional enrichment between the small intestine and large intestine. Furthermore, by combining microbial metagenomics and host transcriptomics analyses, specific correlations were found between gut microbiota and host genes. These included a negative correlation between the TCN1 gene and Prevotella dentalis, possibly related to bacterial metabolic pathways involving vitamin B12, and a positive correlation between the BDH1 gene and Roseburia hominis, possibly because both are involved in fatty acid metabolism. These findings lay the groundwork for further exploration of the co-evolution between the microbiota and the host, specifically in relation to nutrition, metabolism, and immunity. In conclusion, we have elucidated the diversity of the gut microbiota in SPF pigs and conducted a detailed investigation into the interactions between the gut microbiota and host gene expression. These results contribute to our understanding of the intricate dynamics between the gut microbiota and the host, offering important references for advancements in life science research, bioproduct production, and sustainable development in animal husbandry.