Digestion-resistant bacteria (DRB) refer to the ecological bacterial group that can be ingested, but not digested by protistan grazers, thus forming a specific type of bacteria-protist association. To test the hypothesis that the environment affects the assembly of DRB in protists, a mixotrophic ciliate, Paramecium bursaria, and a heterotrophic ciliate, Euplotes vannus, were reared at different temperatures, light conditions, and concentration gradients of antibiotic oxytetracycline and heavy metals. Community profiling indicated that the composition of DRB in both species varied significantly across the manipulated conditions, except for in P. bursaria under light/dark treatments. Clone library analysis of bacterial 16S rRNA genes showed that DRB were diverse. Pseudomonas became more abundant during the warmer treatment of P. bursaria, whereas the dominance of Pseudoalteromonas weakened and Vibrio became more abundant in E. vannus at a higher temperature. During the treatment of diel light:dark cycles, Aestuariibacter and Alteromonas were selected for in E. vannus but not Pseudoalteromonas, which was highly represented in the all-light and alldark treatments. In contrast, P. bursaria consistently hosted Nevskia, Curvibacter, and Asticcacaulis under all light conditions. There were many bacterial species co-resistant to oxytetracycline and to protistan digestion, in which Sphingomonas, Alteromonas, Aestuariibacter, Puniceicoccaceae (Verrucomicrobia), Pseudomonas, and Sulfitobacter were frequently abundant. Flectobacillus and Aestuariibacter were major lead-resistant bacteria associated with the studied protists. Acinetobacter and Hydrogenophaga were abundant in the P. bursaria treated with a high dose of mercury. Aestuariibacter was found as a dominant group of DRB in E. vannus across all cadmium treatments. In summary, this study demonstrates for the first time that environmental stress selects for bacterial populations associated with protists and that there are diverse bacterial species that not only are resistant to pollution stresses but can also survive protistan predation. This work highlights that bacteria-protists associations need to be taken into account in understanding ecological and environmental issues, such as resilience of bacterial community and function, microbial co-occurrence, and quantity and distribution of antibiotic resistant bacteria and genes.