Antibiotics can be biodegraded in activated sludge via co-metabolism and metabolism. In this study, we investigated the biodegradation pathways of sulfamethoxazole (SMX) and antibiotic resistant genes’ (ARGs) fate in different autotrophic and heterotrophic microorganisms, by employing aerobic sludge, mixed sludge, and nitrifying sludge. A threshold concentration of SMX activating the degradation pathways in the initial stage of antibiotics degradation was found and proved in different activated sludge systems. Heterotrophic bacteria played an important role in SMX biodegradation. However, ammonia-oxidizing bacteria (AOB) had a faster metabolic rate, which was about 15 times higher than heterotrophic bacteria, contributing much to SMX removal via co-metabolism. As SMX concentration increases, the amoA gene and AOB relative abundance decreased in aerobic sludge due to the enrichment of functional heterotrophic bacteria, while it increased in nitrifying sludge. Microbial community analysis showed that functional bacteria which possess the capacity of SMX removal and antibiotic resistance were selected by SMX pressure. Potential ARGs hosts could increase their resistance to the biotoxicity of SMX and maintain system performance. These findings are of practical significance to guide antibiotic biodegradation and ARGs control in wastewater treatment plants.