Paleovirology involves the identification of ancient endogenous viral elements within eukaryotic genomes. The evolutionary origins of the reverse-transcribing hepatitis B viruses, however, remain elusive, due to the small number of endogenized sequences present in host genomes. Here we report a comprehensively dated genomic record of hepatitis B virus endogenizations that spans bird evolution from >82 to <12.1 million years ago. The oldest virus relic extends over a 99% complete hepatitis B virus genome sequence and constitutes the first discovery of a Mesozoic paleovirus genome. We show that Hepadnaviridae are >63 million years older than previously known and provide direct evidence for coexistence of hepatitis B viruses and birds during the Mesozoic and Cenozoic Eras. Finally, phylogenetic analyses and distribution of hepatitis B virus relics suggest that birds potentially are the ancestral hosts of Hepadnaviridae and mammalian hepatitis B viruses probably emerged after a bird–mammal host switch. Our study reveals previously undiscovered and multi-faceted insights into prehistoric hepatitis B virus evolution and provides valuable resources for future studies, such as in-vitro resurrection of Mesozoic hepadnaviruses.