Within-patient HIV evolution reflects the strong selection pressure driving viral escape from cytotoxic T-lymphocyte (CTL) recognition. Whether this intrapatient accumulation of escape mutations translates into HIV evolution at the population level has not been evaluated. We studied over 300 patients drawn from the B- and C-clade epidemics, focusing on human leukocyte antigen (HLA) alleles HLA-B57 and HLA-B5801, which are associated with long-term HIV control and are therefore likely to exert strong selection pressure on the virus. The CTL response dominating acute infection in HLA-B57/5801-positive subjects drove positive selection of an escape mutation that reverted to wild-type after transmission to HLA-B57/5801-negative individuals. A second escape mutation within the epitope, by contrast, was maintained after transmission. These data show that the process of accumulation of escape mutations within HIV is not inevitable. Complex epitope- and residue-specific selection forces, including CTL-mediated positive selection pressure and virus-mediated purifying selection, operate in tandem to shape HIV evolution at the population level.