Purpose. To determine the role of history of prostatitis (HP) as an independent risk factor for erectile dysfunction (ED) in Chinese adult males. Methods. We conducted an online survey using a crowd-sourced questionnaire in Chinese adult males. The participants were separated into two groups as adult participants with HP and with no history of prostatitis (NHP) according to the medical history record. As diagnosis criteria of ED, we used the 5 questions of the International Index for Erectile Function (IIEF-5). The general data including height, weight, monthly income, academic background, smoking history, alcohol drinking, marital status, conjugal affection, and other disease history was asked and recorded. The relationship between HP and ED using the chi-square test and logistic regression analyses was investigated and analyzed. Results. In total, 1873 participants answered the questionnaire. 95 participants in the HP group and 1778 participants in the NHP group were included in this study. The rate of participants with HP was 5.343%. ED was found in 68.4% of the HP group and 43% of the NHP group (
p
<
0.001
). Regression analysis showed that participants in HP were more likely to have ED (OR 2.135, 95% CI 1.266–3.60) after adjusting for the participant’s age, body mass index (BMI), monthly income, academic background, smoking history, alcohol drinking, marital status, conjugal affection, BPH, hypertension, and diabetes mellitus, when compared with NHP. Conclusions. The present study indicated a high prevalence of ED in Chinese adult males with history of prostatitis, and HP is an independent risk factor for erectile dysfunction.