Species interactions and coevolution are integral to ecological communities, but we lack empirical information on when and how these interactions generate and purge genetic diversity. Using genomic time series data from host-virus experiments, we found that coevolution occurs through consecutive selective sweeps in both species, with temporal consistency across replicates. Sweeps were accompanied by phenotypic change (resistance or infectivity increases) and expansions in population size. In the host, population expansion enabled rapid generation of genetic diversity in accordance with neutral processes. Viral molecular evolution was, in contrast, confined to few genes, all putative targets of selection. This study demonstrates that molecular evolution during species interactions is shaped by both eco-evolutionary feedback dynamics and interspecific differences in how genetic diversity is generated and maintained.