With the advent of next-generation sequencing, paleogenetics has considerably expanded over the past few years and notably encompassed the characterization of the genomes of archaic humans who lived more than 30,000 years ago. These paleogenetics investigations have revealed that admixture between modern and archaic humans occurred, with Neanderthals having contributed to 1.5% to 2.1% of modern Eurasian genomes, and Denisovans to 3% to 6% of modern Melanesian genomes and to approximately 0.2% of modern Asian genomes. Although these contributions are modest, they played a major role in shaping immune gene families, such as the HLA class I genes, for which the archaic alleles now represent more than 50% of the alleles in Europe and Asia. Such a high frequency is consistent with these archaic HLA class I variants having been positively selected because of their protective effect against contagious and devastating epidemics, such as those due to the plague agent Yersinia pestis or to Mycobacterium tuberculosis, which is responsible for deadly tuberculosis. While the exact nature of the infectious agents that contributed to the selection of the archaic variants is unknown, we are entering an exciting period in which paleogenetics and paleomicrobiology data can be integrated to generate a clearer picture of how the immune system of modern populations was shaped and the role admixture and epidemics have played in such evolutions.