Major histocompatibility complex (MHC) class I molecules determine immune responses to viral infections. These polymorphic cell-surface glycoproteins bind peptide antigens, forming ligands for cytotoxic T and natural killer cell receptors. Under pressure from rapidly evolving viruses, hominoid MHC class I molecules also evolve rapidly, becoming diverse and species-specific. Little is known of the impact of infectious disease epidemics on MHC class I variant distributions in human populations, a context in which the chimpanzee is the superior animal model. Population dynamics of the chimpanzees inhabiting Gombe National Park, Tanzania have been studied for over 50 years. This population is infected with SIVcpz, the precursor of human HIV-1. Because HLA-B is the most polymorphic human MHC class I molecule and correlates strongly with HIV-1 progression, we determined sequences for its ortholog, Patr-B, in 125 Gombe chimpanzees. Eleven Patr-B variants were defined, as were their frequencies in Gombe’s three communities, changes in frequency with time, and effect of SIVcpz infection. The growing populations of the northern and central communities, where SIVcpz is less prevalent, have stable distributions comprising a majority of low-frequency Patr-B variants and a few high-frequency variants. Driving the latter to high frequency has been the fecundity of immigrants to the northern community, whereas in the central community, it has been the fecundity of socially dominant individuals. In the declining population of the southern community, where greater SIVcpz prevalence is associated with mortality and emigration, Patr-B variant distributions have been changing. Enriched in this community are Patr-B variants that engage with natural killer cell receptors. Elevated among SIVcpz-infected chimpanzees, the Patr-B*06:03 variant has striking structural and functional similarities to HLA-B*57, the human allotype most strongly associated with delayed HIV-1 progression. Like HLA-B*57, Patr-B*06:03 correlates with reduced viral load, as assessed by detection of SIVcpz RNA in feces.