Introduction Despite a resurgence of disease, risk factors for pertussis in children in low and middle-income countries are poorly understood. This study aimed to investigate risk factors for pertussis disease in African children hospitalized with severe LRTI. Methods A prospective study of children hospitalized with severe LRTI in Cape Town, South Africa was conducted over a one-year period. Nasopharyngeal and induced sputum samples from child and nasopharyngeal sample from caregiver were tested for Bordetella pertussis using PCR (IS481+/hIS1001). History and clinical details were documented. Results 460 children with a median age of 8 (IQR 4–18) months were enrolled. B. pertussis infection was confirmed in 32 (7.0%). The adjusted risk of confirmed pertussis was significantly increased if infants were younger than two months [aRR 2.37 (95% CI 1.03–5.42]), HIV exposed but uninfected (aRR 3.53 [95% CI 1.04–12.01]) or HIV infected (aRR 4.35 [95% CI 1.24–15.29]). Mild (aRR 2.27 [95% CI 1.01–5.09]) or moderate (aRR 2.70 [95% CI 1.13–6.45]) under-nutrition in the children were also associated with higher risk. The highest adjusted risk occurred in children whose caregivers had B. pertussis detected from nasopharyngeal swabs (aRR 13.82 [95% CI 7.76–24.62]). Completion of the primary vaccine schedule (three or more doses) was protective (aRR 0.28 [95% CI 0.10–0.75]). Conclusions HIV exposure or infection, undernutrition as well as detection of maternal nasal B. pertussis were associated with increased risk of pertussis in African children, especially in young infants. Completed primary vaccination was protective. There is an urgent need to improve primary pertussis vaccine coverage in low and middle-income countries. Pertussis vaccination of pregnant women, especially those with HIV infection should be prioritized.