After failure of first-line antiretroviral therapy (ART) in the public sector, delayed or missed second-line ART switch is linked with poor outcomes in patients with advanced HIV. We investigated delayed or missed second-line ART switch after confirmed virologic failure in the largest private sector HIV cohort in Africa. We included HIV-infected adults with confirmed virologic failure after 6 months of nonnucleoside reverse-transcriptase inhibitor-based ART. We estimated the effect of timing of switch on the hazard of death using inverse probability of treatment weighting of marginal structural models. We adjusted for time-dependent confounding of CD4 count, viral load, and visit frequency. Five thousand seven hundred forty-eight patients (53% female) with confirmed virologic failure met inclusion criteria; the median age was 40 [interquartile range (IQR): 35-47], advanced HIV was present in 48% and the prior duration of nonnucleoside reverse-transcriptase inhibitor-based ART was 1083 days (IQR: 665-1770). Median time to confirmation of virologic failure and to second-line switch was 196 (IQR: 136-316) and 220 days (IQR: 65-542), respectively. Switching to second-line ART after confirmed failure compared with remaining on first-line ART reduced risk of subsequent death [adjusted hazard ratio: 0.47 (95% confidence interval: 0.36 to 0.63)]. Compared with patients who experienced delayed switch, those switched immediately had a lower risk of death, regardless of CD4 cell count. Delayed or missed switch to second-line ART after confirmed first-line ART failure is common in the South African private sector and associated with mortality. Novel interventions to minimize switch delay should be tested and not limited to those with advanced disease at treatment failure.