The aim of the study was to investigate the association between methylmalonic acid (MMA), a biomarker of mitochondrial dysfunction, and the risk of prostate cancer (PCa). The relevant data were collected from the National Health and Nutrition Examination Survey (NHANES). Weighted univariable and multivariable logistic regression analyses were performed to investigate the association between MMA and risk of PCa. A stratified analysis was also carried out. The dose-response relationship was elucidated by conducting a restricted cubic spline function. A total of 2451 participants were included, of which 95 were PCa participants. The fully-adjusted model 2 constructed by weighted multivariable logistic regression analysis showed that the risk of PCa decreased by 53% when every MMA unit was added [OR: 0.47 (0.22-1.00), P = 0.049]. And a decrease in PCa risk was associated with a higher MMA level in MMA subgroups [OR: 0.34 (0.15-0.82), P = 0.02]. The results from a stratified analysis showed that participants in subgroups of other race, BMI (> 30kg/m2), smoking (former and now), and hypertension (yes), an increase in every MMA unit was linked to a decrease in PCa risk. MMA and the risk of PCa were negatively correlated in a linear manner. It was discovered in the study that an increase in MMA level is connected to a decrease in PCa risk. The serum MMA level may be helpful in assessing PCa risk.