Although observational studies have identified an association between smoking and prostatitis, the causal relationship between the two factors remains uncertain. To clarify this association, we used the Two-sample Mendelian randomization (TSMR) method. We obtained exposure and outcome data from publicly available databases. To assess the association between smoking and the risk of prostatitis, we employed multiple statistical approaches, including inverse-variance weighted (IVW), weighted median, weighted mode, MR-Egger, and sample mode. To minimize bias, we conducted Cochran's Q test, generated a funnel plot, utilized MR-Egger analysis, employed the Leave-one-out method, and performed the MR pleiotropy residual sum and outlier test. Based on our TSMR analysis, we found a significant positive correlation between smoking and the risk of prostatitis (OR = 2.26, p-value = 0.019). Furthermore, we observed no heterogeneity in the study as indicated by the Cochran Q-test (p = 0.533 for MR-Egger; p = 0.650 for IVW). Additionally, there was no conclusive evidence of horizontal pleiotropy. Overall, our TSMR analysis provides strong supportive evidence for a causal relationship between smoking and an increased risk of prostatitis. Quitting smoking may reduce the damage caused by smoking to the prostate. This study provides a new mindset for the management of prostatitis.