Bacterial loading aggravates the harm of particulate matter (PM) to public health and ecological systems, especially in operations of concentrated animal production. This study aimed to explore the characteristics and influencing factors of bacterial components of inhalable particles at a piggery. The morphology and elemental composition of coarse particles (PM10, aerodynamic diameter ≤ 10 µm) and fine particles (PM2.5, aerodynamic diameter ≤ 2.5 µm) were analyzed. Full-length 16 S rRNA sequencing technology was used to identify bacterial components according to breeding stage, particle size, and diurnal rhythm. Machine learning (ML) algorithms were used to further explore the relationship between bacteria and the environment. The results showed that the morphology of particles in the piggery differed, and the morphologies of the suspected bacterial components were elliptical deposited particles. Full-length 16 S rRNA indicated that most of the airborne bacteria in the fattening and gestation houses were bacilli. The analysis of beta diversity and difference between samples showed that the relative abundance of some bacteria in PM2.5 was significantly higher than that in PM10 at the same pig house (P