The anaerobic ammonium oxidation (anammox) by autotrophic anaerobic ammonia-oxidizing bacteria (AnAOB) is a biological process used to remove reactive nitrogen from wastewater. It has been repeatedly reported that elevated nitrite concentrations can severely inhibit the growth of AnAOB, which renders the anammox process challenging for industrial-scale applications. Both denitrifying (DN) and dissimilatory nitrate reduction to ammonium (DNRA) bacteria can potentially consume excess nitrite in an anammox system to prevent its inhibitory effect on AnAOB. However, metabolic interactions among DN, DNRA, and AnAOB bacteria under elevated nitrite conditions remain to be elucidated at metabolic resolutions. In this study, a laboratory-scale anammox bioreactor was used to conduct an investigation of the microbial shift and functional interactions of AnAOB, DN, and DNRA bacteria during a long-term nitrite inhibition to eventual self-recovery episode. The relative abundance of AnAOB first decreased due to high nitrite concentration, which lowered the system’s nitrogen removal efficiency, but then recovered automatically without any external interference. Based on the relative abundance variations of genomes in the inhibition, adaptation, and recovery periods, we found that DN and DNRA bacteria could be divided into three niche groups: type I (types Ia and Ib) that includes mainly DN bacteria and type II and type III that include primarily DNRA bacteria. Type Ia and type II bacteria outcompeted other bacteria in the inhibition and adaptation periods, respectively. They were recognized as potential nitrite scavengers at high nitrite concentrations, contributing to stabilizing the nitrite concentration and the eventual recovery of the anammox system. These findings shed light on the potential engineering solutions to maintain a robust and efficient industrial-scale anammox process.