BackgroundEctopic pregnancy (EP) is the leading cause of maternal death during the first trimester of pregnancy. A better understanding of EP risk can help prevent its occurrence. We carried out a multi-center, large-sample, case-control study to evaluate the risk factors for EP in Shanghai, China.MethodsWomen who were diagnosed with EP (n = 2411) and women with intrauterine pregnancies (n = 2416) were recruited from five hospitals in Shanghai, China. Information regarding the sociodemographic characteristics; reproductive, gynecological and surgical history; and previous and current use of contraceptives was collected from all participants. Odds ratios (ORs) and 95 % confidence intervals (CIs) were calculated and adjusted for potential confounding factors via multivariate logistic regression analysis.ResultsThe study revealed that the risk of EP was associated with the traditional risk factors including previous EP (Adjusted odds ratio [AOR] = 2.72, 95 % CI: 1.83–4.05), previous Chlamydia trachomatis infection (Adjusted OR = 3.18, 95 % CI: 2.64, 3.84), previous infertility (AOR = 2.18, 95 % CI: 1.66–2.88), previous adnexal surgery (AOR = 2.09, 95 % CI: 1.49–2.93), previous appendectomy (AOR = 1.64, 95 % CI: 1.13–2.37), and previous use of intrauterine devices (IUDs) (AOR = 1.72, 95 % CI: 1.39–2.13). Additionally, EP risk was increased following the failure of most contraceptives used in the current cycle including IUDs (AOR = 16.43, 95 % CI: 10.42–25.89), oral contraceptive pills (AOR = 3.02, 95 % CI: 1.16–7.86), levonorgestrel emergency contraception (AOR = 4.75, 95 % CI: 3.79–5.96), and female sterilization (AOR = 4 .73, 95 % CI: 1.04–21.52). Stratified analysis showed that in vitro fertilization and embryo transfer (IVF-ET) was the main risk factor for EP in women with tubal infertility (AOR = 8.99, 95 % CI: 1.98–40.84), although IVF-ET showed no association with EP in women with non-tubal infertility (AOR = 2.52, 95 % CI: 0.14–44.67).ConclusionIn addition to the traditional risk factors, IVF-ET and current IUD use play dominant roles in the occurrence of EP. Attention should be given to women with tubal infertility who have undergone IVE-ET treatment.