The rich species diversity of bats encompasses extraordinary adaptations, including extreme longevity and tolerance to infectious disease. While traditional approaches using genetic screens in model organisms have uncovered some fundamental processes underlying these traits, model organisms do not possess the variation required to understand the evolution of traits with complex genetic architectures. In contrast, the advent of genomics at tree-of-life scales enables us to study the genetic interactions underlying these processes by leveraging millions of years of evolutionary trial-and-error. Here, we use the rich species diversity of the genus Myotis - one of the longest-living clades of mammals - to study the evolution of longevity-associated traits and infectious disease using functional evolutionary genomics. We generated reference genome assemblies and cell lines for 8 closely related (~11 MY divergence) species of Myotis rich in phenotypic and life history diversity. Using genome-wide screens of positive selection, analysis of structural variation and copy number variation, and functional experiments in primary cell lines, we identify new patterns of adaptation in longevity, cancer resistance, and viral interactions both within Myotis and across bats. We find that the rapid evolution of lifespan in Myotis has some of the most significant variations in cancer risk across mammals, and we demonstrate a unique DNA damage response in the long-lived M. lucifugus using primary cell culture models. Furthermore, we find evidence of abundant adaptation in response to DNA viruses, but not RNA viruses, in Myotis and other bats. This contrasts with patterns of viral adaptation in humans, which may contribute to the importance of bats as a reservoir of zoonotic viruses. Together, our results demonstrate the utility of leveraging natural variation to understand the genomics of traits with implications for human health and suggest important pleiotropic relationships between infectious disease tolerance and cancer resistance.