Objective: To evaluate the associations of HIV infection with preterm birth (PTB), and of HIV antiretroviral therapy (ART) with PTB. Methods: We analysed singleton live-born pregnancies among women from 1995 to 2019 in the Women's Interagency HIV Study, a prospective cohort of US women with, or at risk for, HIV. The primary exposures were HIV status and ART use before delivery [none, monotherapy or dual therapy, or highly active antiretroviral therapy (HAART)]. The primary outcome was PTB < 34 weeks, and, secondarily, < 28 and < 37 weeks. We analysed self-reported birth data, and separately modelled the associations between HIV and PTB, and between ART and PTB, among women with HIV. We used modified Poisson regression, and adjusted for age, race, parity, tobacco use and delivery year, and, when modelling the impact of ART, duration from HIV diagnosis to delivery, nadir CD4 count, and pre-pregnancy viral load and CD4 count. Results: We analysed 488 singleton deliveries (56% exposed to HIV) to 383 women. The risk of PTB < 34 weeks was similar among women with and without HIV, but the risk of PTB < 37 weeks was higher [32% vs. 23%; adjusted risk ratio (aRR) = 1.43; 95% confidence interval (CI): 1.07–1.91] among women with HIV. The risk of PTB < 34 weeks was lower among women with HIV receiving HAART than among those receiving no ART (7% vs. 26%; aRR:0.19; 95% CI: 0.08–0.44). The associations between HAART and PTB < 28 and < 37 weeks were similar. Conclusions: Antiretroviral therapy exposure was associated with a decreased risk of PTB among a US cohort of women with HIV. Given the growing concerns about ART and adverse pregnancy outcomes, this finding that ART may be protective for PTB is reassuring.