Pig farming has an effect on farmers and the farm environment. Pig gut microbes play an important role in this effect. However, which microbial composition is more likely to be affected remains unknown. Primarily, we collected 136 samples in pig farm A, including 70 pig fecal, 18 farmers, 4 individuals without contact with any type of farm animal (“non-exposed” persons) fecal, and 44 environmental dust samples (dust from inside and outside pig houses and the farm). Another 43 samples were collected from pig farm B, including 10 pig fecal, 24 environment samples, and 9 humans fecal. Whereafter, 16S rRNA sequencing and taxonomic composition analysis were performed. Result showed that pig farmers significantly upregulated 13 genera compared with non-exposed persons, and 76 genera were significantly upregulated inside the pig house than outside the pig house. Comparing non-exposed persons who were farther away from the pig farm, the results showed that the relative abundance of three microbes, including Turicibacter, Terrisporobacter, and Clostridium_sensu_stricto_1, increased between the farmers and environment inside and outside the pig farm, and significant differences were observed (P < 0.05). Moreover, the abundance increased with the exposure time of farmer animals and spatial location to pigs. The greater the distance from the farm, the less effective the three microbes were. Although the distance is about 550 km, the analysis results of pig farm A and pig farm B confirm each other. This study shows that the three microbes where pig farmers co-occurring with the environment come from pig farms, which provides new ideas for blocking the transmission of microbial aerosols in pig farms and reducing pollution.