Viruses exist anywhere on earth where there is life, and among them, virus‐encoded auxiliary metabolic genes (AMGs) can maintain ecosystem balance and play a major role in the global ecosystem. Although the function of AMGs has been widely reported, the genetic diversity of AMGs in natural ecosystems is still poorly understood. Exploring the genetic diversity of viral community‐wide AMGs is essential to gain insight into the complex interactions between viruses and hosts. In this article, we studied the phylogenetic tree, principal co‐ordinates analysis (PCoA), α diversity, and metabolic pathways of viral auxiliary metabolism genes involved in the pentose phosphate pathway (PPP) through metagenomics, and the changes of metabolites and genes of host bacteria were further studied by using Pseudomonas mandelii SW‐3 and its lytic phage based on metabolic flow and AMGs expression. We found that the viral AMGs in the Napahai plateau wetland were created by a combination of various external forces, which contributed to the rich genetic diversity, uniqueness, and differences of the virus, which promoted the reproduction of offspring and better adaptation to the environment. Overall, this study systematically describes the genetic diversity of AMGs associated with the PPP in plateau wetland ecosystems and further expands the understanding of phage–host unique interactions.