Anaerobic ammonium oxidation bacteria (AAOB), distinguished by their unique autotrophic nitrogen metabolism, hold pivotal positions in the global nitrogen cycle and environmental biotechnologies. However, the ecophysiology and evolution of AAOB remain poorly understood, attributed to the absence of monocultures. Hence, a comprehensive elucidation of the AAOB-dominated core microbiome, anammox core, is imperative to further completing the theory of engineered nitrogen removal and ecological roles of anammox. Performing taxonomic and phylogenetic analyses on collected genome repertoires, we show here that Candidatus Brocadia and Candidatus Kuenenia possesses a more compact core than Candidatus Jettenia, which partly explains why the latter has a less common ecological presence. Evidence of gene flow is particularly striking in functions related to biosynthesis and oxygen detoxification, underscoring the evolutionary forces driving lineage and core differentiation. Furthermore, CRISPR spacer traceback of the AAOB metagenome-assembled genomes (MAGs) reveals a series of genetic traces for the concealed phages. By reconceptualizing the functional divergence of AAOB with the historical role of phages, we ultimately propose a coevolutionary framework to understand the evolutionary trajectory of anammox microecology. The discoveries provided in this study offer new insights into understanding the evolution of AAOB and the ecology of anammox.