Background This study aimed to investigate whether early eradication therapy influences systemic lupus erythematosus (SLE) risk in patients with Helicobacter pylori (HP) infection. Methods We identified 41,653 patients with HP infection in Taiwan from 2000 to 2013. The patient population was divided into early (within three months) and late (after three months) eradication cohorts. age, sex, co-morbidities and medical visits were matched at a 1:1 ratio. Multiple Cox regression, sensitivity analysis and stratified analysis were used to estimate SLE adjusted hazard ratios (aHR). Results The relative risk of SLE was 0.75 (95% confidence interval 0.43–1.31) in the early eradication cohort. After multivariate adjustment, the SLE risk was non-significantly lower in the early eradication cohort than in the late eradication cohort (aHR = 0.74, 95% CI 0.42–1.29). Stratified analysis revealed that early eradication could significantly reduce SLE risk during the three-year follow-up period (aHR = 0.16, 95% CI 0.05–0.53, p for interaction = 0.0013). Compared to eradication within three months of diagnosis, eradication within 3–36 months and >36 months corresponded with SLE aHRs of 4.78 (95% CI 1.19–19.20) and 7.66 (95% CI 2.17–27.05), respectively, when the follow-up period was less than three years. Conclusion Early HP eradication could significantly reduce SLE risk, especially in the first three-year follow-up.