To investigate the effect of sodium dodecyl benzene sulfonate (SDBS) on nitrogen (N) removal performance and biological mechanisms, a gradient of SDBS concentrations was introduced into a set of sequencing batch biofilm reactors (SBBRs). The results indicated that a negative correlation was observed between SDBS concentration and the removal efficiencies of chemical oxygen demand (COD), ammonia nitrogen (NH4+-N), and nitrate nitrogen (NO3−-N). Compared to the control group, their removal efficiencies were the lowest (decreases of 11.83 %, 12.15 %, and 8.11 %) when SDBS concentration was 1.67 mg (g MLSS) -1 (5 mg L−1). High-throughput sequencing showed that the abundance of Proteobacteria remained stable with SDBS addition, while the abundances of Patescibacteria and Actinobacteria decreased by 0.67–0.70 % and 0.69–3.06 %, respectively. Moreover, SDBS reduced both microbial diversity and richness and hindered the interspecific relationships among microorganisms. It also inhibited N metabolic activities and led to a decrease in the expression of key functional genes involved in N transformation (nifD, nifH, nasA, norB, norC, and nosZ). Additionally, the abundances of key enzymes (EC:1.7.99.1, EC:1.7.2.4, and EC:1.1.1.42) in the N and tricarboxylic acid (TCA) cycles decreased following the addition of SDBS. This study provided insights into the effects of SDBS on N removal in activated sludge-biofilm systems and the adaptive responses of microbial communities to SDBS exposure.