Abstract:[Background] The bacterial and microeukaryotic communities in activated sludge (AS) play crucial roles in wastewater treatment. However, limited information is available regarding the microbial generalists and specialists in AS. [Objective] Aims to study the relationships between environmental factors and AS microbial generalists and specialists, and explore the community assembly mechanisms, evolutionary rates, and diversification potential of AS microbial generalists and specialists. [Methods] Amplicon sequencing and multivariate statistical analysis were employed to explore the community structures of AS microbial generalists and specialists from wastewater treatment plants located in the southeastern coastal region of China. Additionally, the infer community assembly mechanisms by phylogenetic-bin-based null model analysis (iCAMP) was conducted to explore the assembly mechanisms of those groups, while the evolutionary rates were assessed by the binary-state speciation and extinction (BiSSE) model. [Results] The community structures of bacterial generalists and specialists were significantly correlated with electrical conductivity, ammonia nitrogen, and nitrite nitrogen, while the total nitrogen was the primary factor influencing the community structures of the microeukaryotic generalists and specialists. However, electrical conductivity and nitrite nitrogen played major roles in shaping the microeukaryotic specialists. Stochastic processes played a dominant role in the community assembly of both bacteria and microeukaryotes in AS, especially for the generalists than the specialists as well as for the microeukaryotes than the bacteria. Bacteria exhibited higher speciation rates and lower extinction rates than microeukaryotes, which suggested higher diversification potential. The specialists exhibited higher speciation rates, extinction rates, and diversification potential than the generalists. [Conclusion] Ammonia nitrogen, nitrite nitrogen, and electrical conductivity were significant environmental factors influencing the community structures of bacterial generalists and specialists, and microeukaryotic specialists. Stochastic processes mainly drove the community assembly of the generalists and specialists. Moreover, the AS generalists and specialists exhibited different speciation rates.