Neutralizing antibodies are likely to play a crucial part in a preventative HIV-1 vaccine. Although efforts to elicit broadly cross-neutralizing (BCN) antibodies by vaccination have been unsuccessful1, 2, 3, a minority of individuals naturally develop these antibodies after many years of infection4, 5, 6, 7. How such antibodies arise, and the role of viral evolution in shaping these responses, is unknown. Here we show, in two HIV-1–infected individuals who developed BCN antibodies targeting the glycan at Asn332 on the gp120 envelope, that this glycan was absent on the initial infecting virus. However, this BCN epitope evolved within 6 months, through immune escape from earlier strain-specific antibodies that resulted in a shift of a glycan to position 332. Both viruses that lacked the glycan at amino acid 332 were resistant to the Asn332-dependent BCN monoclonal antibody PGT128 (ref. 8), whereas escaped variants that acquired this glycan were sensitive. Analysis of large sequence and neutralization data sets showed the 332 glycan to be significantly under-represented in transmitted subtype C viruses compared to chronic viruses, with the absence of this glycan corresponding with resistance to PGT128. These findings highlight the dynamic interplay between early antibodies and viral escape in driving the evolution of conserved BCN antibody epitopes.