Although viruses have threatened our ancestors for millions of years, prehistoric epidemics of viruses are largely unknown. Endogenous bornavirus-like elements (EBLs) are ancient viral sequences that have been integrated into animal genomes. These elements can be used as molecular fossil records to trace past bornaviral infections. In this study, we systematically identified EBLs in vertebrate genomes and revealed the history of bornavirus infections over nearly 100 million years. We found that ancient bornaviral infections have occurred in diverse vertebrate lineages, especially in primate ancestors. Phylogenetic analyses indicated that primate ancestors had been infected with various bornaviral lineages during evolution. Moreover, EBLs in primate genomes formed clades according to their integration ages, suggesting that epidemic lineages of bornaviruses had changed chronologically. However, we found that some bornaviral lineages coexisted with primate ancestors and underwent repeated endogenizations for tens of millions of years. Furthermore, this viral lineage that coexisted with primate ancestors was also endogenized in some ancestral bats. Notably, the geographic distributions of these bat ancestors have been reported to overlap with the migration route of primate ancestors, suggesting that long-term virus-host coexistence could have expanded the geographic distributions of the viral lineage and might have spread their infections to new hosts. Thus, our findings describe hidden virus-host co-evolutionary history over geological timescales, including chronological change in epidemic bornaviral lineages, long-term virus-host coexistence, and expansion of viral infections.