We examined longitudinal patterns and cofactors of depressive symptoms among pregnant and postpartum women living with HIV (WLWH). This study used data from a randomized trial of a text messaging intervention. WLWH were serially assessed for depressive symptoms from pregnancy through 24 months postpartum at 6 time points (pregnancy, 6 weeks, and 6, 12, 18, and 24 months postpartum). Depressive symptoms were assessed using Patient Health Questionnaire-9 and longitudinal patterns using group-based trajectory modeling. Moderate-to-severe depressive symptoms (MSD) correlates were assessed using generalized estimating equations. Among 824 enrolled women, 14.6% ever had MSD during pregnancy or postpartum; 8.6% of WLWH had MSD in pregnancy and 9.0% any postpartum MSD. MSD was associated with abuse [RR: 3.8, 95% confidence interval (CI): 2.6 to 5.4], stigma (RR: 4.4, 95% CI: 3.1 to 6.3), and food insecurity (RR: 2.7, 95% CI: 1.9 to 3.8). Unintended pregnancy (RR: 1.6, 95% CI: 1.1 to 2.3) and recent HIV diagnosis (RR: 1.8, 95% CI: 1.2 to 2.6) were associated with higher MSD risk, whereas HIV status disclosure to partner (RR: 0.3, 95% CI: 0.2 to 0.6) and social support (RR: 0.97, 95% CI: 0.96 to 0.98) were associated with lower risk. Trajectory modeling identified 4 phenotypes of peripartum depressive symptoms: persistent no/low symptoms (38.5%), mild symptoms resolving postpartum (12.6%), low symptoms increasing slightly in postpartum (47.9%), and persistent moderate-severe symptoms throughout (1.1%). WLWH attending PMTCT services had varied patterns of depressive symptoms, which were associated with stressors (recent diagnosis and food insecurity) and factors reflecting low social power (abuse, stigma, and unintended pregnancy). Women experiencing concurrent abuse, stigma, and food insecurity should be prioritized for interventions to prevent persistent depression.