A substantial proportion of epithelial ovarian cancer (EOC) arises in the fallopian tube and other epithelia of the upper genital tract; these epithelia may incur damage and neoplastic transformation after sexually transmitted infections (STI) and pelvic inflammatory disease. We investigated the hypothesis that past STI infection, particularly Chlamydia trachomatis, is associated with higher EOC risk in a nested case‐control study within the European Prospective Investigation into Cancer and Nutrition (EPIC) cohort including 791 cases and 1669 matched controls. Serum antibodies against C. trachomatis, Mycoplasma genitalium, herpes simplex virus type 2 (HSV‐2) and human papillomavirus (HPV) 16, 18 and 45 were assessed using multiplex fluorescent bead‐based serology. Conditional logistic regression was used to estimate relative risks (RR) and 95% confidence intervals (CI) comparing women with positive vs. negative serology. A total of 40% of the study population was seropositive to at least one STI. Positive serology to C. trachomatis Pgp3 antibodies was not associated with EOC risk overall, but with higher risk of the mucinous histotype (RR = 2.30 [95% CI = 1.22‐4.32]). Positive serology for chlamydia heat shock protein 60 (cHSP60‐1) was associated with higher risk of EOC overall (1.36 [1.13‐1.64]) and with the serous subtype (1.44 [1.12‐1.85]). None of the other evaluated STIs were associated with EOC risk overall; however, HSV‐2 was associated with higher risk of endometrioid EOC (2.35 [1.24‐4.43]). The findings of our study suggest a potential role of C. trachomatis in the carcinogenesis of serous and mucinous EOC, while HSV‐2 might promote the development of endometrioid disease.