Few investigations have assessed contributions of both vaginal bacteria and proinflammatory immune mediators to human immunodeficiency virus (HIV) acquisition risk in a prospective cohort. We conducted a nested case-control study of African women who participated in a randomized placebo-controlled trial of daily oral versus vaginal tenofovir-based preexposure prophylaxis for HIV infection. Vaginal concentrations of 23 bacterial taxa and 16 immune mediators were measured. Relationships between individual bacterial concentrations or immune mediators and HIV risk were analyzed using generalized estimating equations in a multivariable model. Factor analysis assessed relationships between combinations of bacterial taxa, immune mediators, and HIV acquisition risk. We identified 177 HIV pre-seroconversion visits from 150 women who acquired HIV and 531 visits from 436 women who remained HIV uninfected. Fourteen bacterial taxa and 6 proinflammatory cytokines and chemokines were individually associated with greater HIV risk after adjusting for confounders. Women with all 14 taxa versus <14 taxa (adjusted odds ratio [aOR], 4.45 [95% confidence interval {CI}, 2.20-8.98]; P < .001) or all 6 immune mediators versus <6 mediators (aOR, 1.77 [95% CI, 1.24-2.52]; P < .001) had greater risk for HIV acquisition. Factor analysis demonstrated that a bacterial factor comprised of 14 high-risk bacterial taxa (aOR, 1.57 [95% CI, 1.27-1.93]; P < 0.001) and the interferon gamma-induced protein 10 (highest quartile: aOR, 3.19 [95% CI, 1.32-7.72]; P = 0.002) contributed to the highest HIV risk. Bacterial and host biomarkers for predicting HIV acquisition risk identify women at greatest risk for HIV infection and can focus prevention efforts.