Bacteriophages (“phage”) play important roles in nutrient cycling and ecology in environments by regulating soil microbial community structure. Here, metagenomic sequencing showed that a low relative abundance of nitrogen-fixing bacteria but high abundance of Enterobacter-infecting phages in paddy soil where rice plants showed nitrogen deficiency. From soil in the same field, we also isolated and identified a novel virulent phage (named here as Apdecimavirus NJ2) that infects several species of Enterobacter and characterized its impact on nitrogen fixation in the soil and in plants. It has the morphology of the Autographiviridae family, with a dsDNA genome of 39,605 bp, 47 predicted open reading frames and 52.64 % GC content. Based on genomic characteristics, comparative genomics and phylogenetic analysis, Apdecimavirus NJ2 should be a novel species in the genus Apdecimavirus, subfamily Studiervirinae. After natural or sterilized field soil was potted and inoculated with the phage, soil nitrogen-fixation capacity and rice growth were impaired, the abundance of Enterobacter decreased, along with the bacterial community composition and biodiversity changed compared with that of the unadded control paddy soil. Our work provides strong evidence that phages can affect the soil nitrogen cycle by changing the bacterial community. Controlling phages in the soil could be a useful strategy for improving soil nitrogen fixation.