Background When used effectively, oral pre-exposure prophylaxis (PrEP; tenofovir disoproxil fumarate and emtricitabine) prevents maternal HIV acquisition and reduces the risk of vertical transmission. Our study aimed to better understand PrEP initiation, continued use, and adherence in pregnant and postpartum women. Methods The PrEP in Pregnancy and Postpartum (PrEP-PP) study is a demonstration cohort study that enrolled pregnant women aged 16 years and older without HIV attending their first antenatal care visit in Cape Town, South Africa, between Aug 29, 2019, and Oct 10, 2021. Eligible, consenting women were followed up quarterly up to 12 months postpartum with regular HIV testing and offer of PrEP with ongoing adherence counselling. The primary outcome was distribution of women across the PrEP cascade (ie, initiation and continuation up to 12 months postpartum) with crude and adjusted hazard ratios (HRs). We also report on HIV incidence by pregnancy and postpartum status. Findings Overall, 1195 pregnant women were recruited and followed up (median age 26 years, IQR 23-31; median gestational age 21 weeks, IQR 15-31); 1009 (84<middle dot>4%) started PrEP at enrolment. Among women who initiated PrEP at enrolment, 668 (67<middle dot>5%) of 990 continued PrEP at the 1-month follow-up, 485 (49<middle dot>9%) of 972 continued at 3 months, 392 (39<middle dot>4%) of 994 at 6 months, and 275 (27<middle dot>4%) of 1005 at 12 months. Of 186 women who did not accept PrEP at enrolment, 70 (37<middle dot>6%) of 186 subsequently initiated PrEP. Overall, 200 (18<middle dot>6%) of 1076 women continued PrEP at 12 months postpartum. Of 186 women who did not initiate PrEP at baseline, 70 (37<middle dot>6%) subsequently initiated PrEP during the study. Factors associated with PrEP discontinuation up to 12 months postpartum included being married or cohabiting (adjusted HR 1<middle dot>32, 95% CI 1<middle dot>16-1<middle dot>50), condomless sex since last visit (1<middle dot>43, 1<middle dot>23-1<middle dot>65), reporting intimate partner violence (2<middle dot>03, 1<middle dot>59-2<middle dot>59), or depression in the past 12 months (1<middle dot>53, 1<middle dot>14-2<middle dot>05). Overall, 16 women seroconverted over 1673<middle dot>8 woman-years (HIV incidence rate 0<middle dot>96 per 100 woman-years, 95% CI 0<middle dot>49-1<middle dot>42); 14 discontinued PrEP use and two never initiated PrEP. HIV incidence was 0<middle dot>28 per 100 woman-years during pregnancy (95% CI 0<middle dot>22-0<middle dot>33), and the incidence rate ratio was 1<middle dot>77 per 100 woman-years (0<middle dot>53-5<middle dot>90) 0-6 months postpartum and 2<middle dot>19 per 100 woman-years (0<middle dot>61-7<middle dot>83) 6-12 months postpartum compared with pregnant women. Interpretation There is an urgent need for the integration of PrEP into antenatal and postnatal care and interventions that address barriers to continued use, including targeted counselling during pregnancy and postpartum to reduce PrEP discontinuation.