© Author(s) (or their employer(s)) 2020. Introduction KwaZulu-Natal (KZN), South Africa (SA) has the highest prevalence of pregnant women living with HIV in the world. Pregnancy and the postpartum period offer opportunities to engage women in HIV care, to prevent perinatal transmission and to optimise maternal and infant well-being. However, research suggests that remaining engaged in HIV care during this time can be challenging. Methods and analysis We are conducting a 5-year prospective cohort study among pregnant women living with HIV in KZN to estimate the rates and factors associated with attrition from HIV care during this critical period. To determine who is most likely to fall out of care, we are examining a range of relevant variables informed by a socioecological model of HIV care, including individual, relational, community and healthcare system variables. We are enrolling 18-45-year-old women, at 28 weeks or more of pregnancy, who are living with HIV and currently taking antiretroviral therapies. Participants complete quantitative assessments at baseline (pregnancy) and at 6, 12, 18 and 24 months postpartum. A subset of women and their partners are invited to complete qualitative interviews to further explore their experiences in HIV care. The main study outcomes are suppressed HIV RNA and retention in care at each study assessment. Our understanding of the factors that drive postpartum attrition from HIV care will ultimately inform the development of interventions to facilitate continued engagement in postpartum HIV care. Ethics and dissemination This protocol has been approved by the Human Research Ethics Committee (Medical) at The University of the Witwatersrand (Johannesburg, SA) and the Partners Human Research Committee at Partners HealthCare (Boston, Massachusetts, USA). Site support and approval were obtained from the District Hospital and the KZN Provincial Department of Health. Results will be disseminated through peer-reviewed manuscripts, reports and both local and international presentations (Ethics Registration #170 212).