Anthropogenic pressure and climate change are the main causes of biodiversity loss. It is estimated that by 2050 the extinction of living species could reach 40%. Loss of genetic diversity, inbreeding depression, and mutation deleterious accumulation are the underlying mechanisms that might increase extinction risk reducing the adaptive potential of the endangered populations. Paleogenomics has helped to understand the population dynamics and evolution of extinct megafauna, however, causes of extinction may be species-specific. This PhD thesis is focused to understand the evolutionary dynamics of the immunity in populations of the extinct woolly mammoth and the three extant elephant species. Mammoths and elephants represent the Proboscidean order, a group that has undergone rapid diversification and extinction processes, thus providing fundamental insight into the genetic drivers of both extinction and conservation in closely related species. The approach consisted in analyze the spatiotemporal mammoths immunodiversity during the Late Pleistocene using in- solution target hybridization capture and next-generation sequencing. As a result, deleterious alleles segregate in mammoth populations and were maintained at considerable frequencies during the Late Pleistocene. On the other hand, immunogenetic diversity of TLRs and MHC was measured in the three living elephant populations by incorporation of a novel high throughput multilocus genotyping. Inbreeding and heterozygosity deficiency are decreasing genetic diversity in elephant populations that may implicate a depletion of the immune response, interesting, balancing selection is acting as rebound effect to maintain the MHC diversity. The findings found in this study provides important insight to quantify genetic threats in extinct and endangered species.