Deep sea cold seep sediments have been discovered to harbor novel, abundant, and diverse bacterial and archaeal viruses. However, little is known about viral genetic features and evolutionary patterns in these environments. Here, we examined the evolutionary ecology of viruses across active and extinct seep stages in the area of Haima cold seeps in the South China Sea. Diverse antiviral defense systems in 487 microbial genomes spanning 43 families inform the dynamics of host-virus interactions. Accordingly, a total of 338 viral operational taxonomic units are identified and linked to 36 bacterial and archaeal phyla. Cold seep viruses are predicted to harbor diverse adaptive strategies to persist in this environment, including counter-defense systems, reverse transcriptases, auxiliary metabolic genes, and alternative genetic code assignments. Extremely low nucleotide diversity is observed in cold seep viral populations, being influenced by factors including microbial host, sediment depth and cold seep stage. Most cold seep viral genes are under strong purifying selection with trajectories that differ depending on whether cold seeps are active or extinct. This work sheds light on the understanding of environmental adaptation mechanisms and evolutionary patterns of viruses in the sub-seafloor biosphere.