The bacterial community in different redox regimes of an anoxic-aerobic MBR under different operating conditions was investigated using pyrosequencing. With internal recirculation (IR) between the anoxic and aerobic reactors, the bacterial communities in these reactors were highly similar in structure and phylogenetic relationship, indicating IR as a key driving force shaping the bacterial communities that are responsible for the core function in the system. Without IR, each redox condition sustained the growth of distinct bacterial communities according to their oxygen requirement, and the anoxic community presented a low capacity of nutrient and trace organic contaminant (TrOC) removal. Higher bacterial diversity under longer sludge retention time (SRT) was evident; however, except for a few TrOCs, removal efficiency of TOC, TN and TrOCs were the same irrespective of the SRT. The presence of TrOCs induced shifts in bacterial communities, and a correlation between bacterial communities and TrOC transformation was noted. The important candidates for TrOC biotransformation were the taxa within Proteobacteria, particularly Methylophilales and Myxococcales. Other bacterial groups potentially contributing to TrOC biotransformation were those related to nitrogen removal, such as Rhodocyclales and Plantomycetes. In contrast, the detected members of Cytophagaceae (Bacteroidetes) appeared not to contribute to TrOC biotransformation.