To understand how extant viruses interact with their hosts, we need a historical framework of their evolutionary association. Akin to retrovirus or hepadnavirus viral fossils present in eukaryotic genomes, bracoviruses are integrated in braconid wasp genomes and are transmitted by Mendelian inheritance. However, unlike viral genomic fossils, they have retained functional machineries homologous to those of large dsDNA viruses pathogenic to arthropods. Using a phylogenomic approach, we resolved the relationships between bracoviruses and their closest free relatives: baculoviruses and nudiviruses. The phylogeny showed that bracoviruses are nested within the nudivirus clade. Bracoviruses establish a bridge between the virus and animal worlds. Their inclusion in a virus phylogeny allowed us to relate free viruses to fossils. The ages of the wasps were used to calibrate the virus phylogeny. Bayesian analyses revealed that insect dsDNA viruses first evolved at ∼310 Mya in the Paleozoic Era during the Carboniferous Period with the first insects. Furthermore the virus diversification time frame during the Mesozoic Era appears linked to the diversification of insect orders; baculoviruses that infect larvae evolved at the same period as holometabolous insects. These results imply ancient coevolution by resource tracking between several insect dsDNA virus families and their hosts, dating back to 310 Mya.