Erectile dysfunction (ED) is prevalent among men, but its relationship with dietary habits is uncertain. The aim of our study was to assess whether dietary patterns enhance erectile function by reviewing the literature published before August 1, 2022, via PubMed, Web of Science, and EMBASE databases. The data compiled included author details; publication dates, countries, treatments, patient numbers, ages, follow-ups, and clinical trial outcomes, such as ED cases, odds ratios (ORs), confidence intervals (CIs), and International Index of Erectile Function-5 (IIEF-5) scores with means and standard deviations. An analysis of 14 studies with 27 389 participants revealed that plant-based diets (OR = 0.71, 95% CI: 0.66-0.75; P < 0.00001), low-fat diets (OR = 0.27, 95% CI: 0.13-0.53; P = 0.0002), and alternative diets such as intermittent fasting and organic diets (OR = 0.54, 95% CI: 0.36-0.80; P = 0.002) significantly reduced ED risk. High-protein low-fat diets (hazard ratio [HR] = 1.38, 95% CI: 1.12-1.64; P < 0.00001) and high-carb low-fat diets (HR = 0.79, 95% CI: 0.55-1.04; P < 0.00001) improved IIEF-5 scores. Combined diet and exercise interventions decreased the likelihood of ED (OR = 0.49, 95% CI: 0.28-0.85; P = 0.01) and increased the IIEF-5 score (OR = 3.40, 95% CI: 1.69-5.11; P < 0.0001). Diets abundant in fruits and vegetables (OR = 0.97, 95% CI: 0.96-0.98; P < 0.00001) and nuts (OR = 0.54, 95% CI: 0.37-0.80; P = 0.002) were also correlated with lower ED risk. Our meta-analysis underscores a strong dietary-ED association, suggesting that low-fat/Mediterranean diets rich in produce and nuts could benefit ED management.