Human leukocyte antigen (HLA) genes play a key role in the immune response to infectious diseases, some of which are highly prevalent in specific environments, like malaria in sub-Saharan Africa. Former case-control studies showed that one particular HLA-B allele, B*53, was associated with malaria protection in Gambia, but this hypothesis was not tested so far within a population genetics framework. In this study, our objective was to assess whether pathogen-driven selection associated with malaria contributed to shape the HLA-B genetic landscape of Africa. To that aim, we first typed the HLA-A and -B loci in 484 individuals from 11 populations living in different environments across the Sahel, and we analysed these data together with those available for 29 other populations using several approaches including linear modelling on various genetic, geographic and environmental parameters. In addition to relevant signatures of populations' demography and migrations history in the genetic differentiation patterns of both HLA-A and -B loci, we found that the frequencies of three HLA alleles, B*53, B*78 and A*74, were significantly associated with Plasmodium falciparum malaria prevalence, suggesting their increase through pathogen-driven selection in malaria-endemic environments. The two HLA-B alleles were further identified, by highthroughput sequencing, as B*53:01:01 (in putative linkage disequilibrium with one HLA-C allele, C*04:01:01:01) and B*78:01 in all but one individuals tested, making them appropriate candidates to malaria protection. These results highlight the role of environmental factors in the evolution of the HLA polymorphism and open key perspectives for functional studies focusing on HLA peptide-binding properties.