Breastfeeding improves child survival but is a source of mother-to-child HIV transmission among women with unsuppressed HIV infection. Estimated HIV incidence in children is sensitive to breastfeeding duration among mothers living with HIV (MLHIV). Breastfeeding duration may vary according to maternal HIV status. Sub-Saharan Africa. We analyzed pooled data from nationally representative household surveys conducted during 2003-2019 that included HIV testing and elicited breastfeeding practices. We fitted survival models of breastfeeding duration by country, year, and maternal HIV status for 4 sub-Saharan African regions (Eastern, Central, Southern, and Western). Data were obtained from 65 surveys in 31 countries. In 2010, breastfeeding in the first month of life ("initial breastfeeding") among MLHIV ranged from 69.1% (95% credible interval: 68-79.9) in Southern Africa to 93.4% (92.7-98.0) in Western Africa. Median breastfeeding duration among MLHIV was the shortest in Southern Africa at 15.6 (14.2-16.3) months and the longest in Eastern Africa at 22.0 (21.7-22.5) months. By comparison, HIV-negative mothers were more likely to breastfeed initially (91.0%-98.7% across regions) and for longer duration (median 18.3-24.6 months across regions). Initial breastfeeding and median breastfeeding duration decreased during 2005-2015 in most regions and did not increase in any region regardless of maternal HIV status. MLHIV in sub-Saharan Africa are less likely to breastfeed initially and stop breastfeeding sooner than HIV-negative mothers. Since 2020, UNAIDS-supported HIV estimates have accounted for this shorter breastfeeding exposure among HIV-exposed children. MLHIV need support to enable optimal breastfeeding practices and to adhere to antiretroviral therapy for HIV treatment and prevention of postnatal mother-to-child transmission.