ABSTRACT: The gut microbiota is closely associated with digestion, metabolism, immunity, and host health. The imbalance of the microbial community in livestock directly affects their well-being and, consequently, productivity. The composition and diversity of the gut microbiota are influenced not only by host genetics but also by environmental factors such as the microbial complexity of the rearing environment, feeds, and antibiotics. Here, we focus on the comparison of gut microbial communities in miniature pigs developed for xenotransplantation in specific pathogen-free (SPF) and conventional (non-SPF) facilities. To identify the disparities in gut microbial composition and functionality between these two environments, 16S RNA metagenome sequencing was conducted using fecal samples. The results revealed that the non-SPF pigs had higher gut microbiota diversity than the SPF pigs. The genera Streptococcus and Ruminococcus were more abundant in SPF pigs than in non-SPF pigs. Blautia, Bacteroides, and Roseburia were exclusively observed in SPF pigs, whereas Prevotella was exclusively found in non-SPF pigs. Carbohydrate and nucleotide metabolism, as well as environmental information processing, were predicted to be enriched in SPF pigs. In addition, energy and lipid metabolism, along with processes related to genetic information, cellular communication, and diseases, were predicted to be enriched in non-SPF pigs. This study makes an important contribution to elucidating the impact of environments harboring a variety of microorganisms, including pathogens, on the gut microbiota of miniature pigs. Furthermore, we sought to provide foundational data on the characteristics of the gut microbiota in genetically modified pigs, which serve as source animals for xenotransplantation.