Recent studies have suggested a potential association between methotrexate use and an increased risk of dementia. However, the causal relationship between methotrexate and dementia remains unclear. This study aims to investigate the potential causal effect of methotrexate use on the risk of dementia using a two-sample Mendelian randomization (TSMR) approach. We conducted a TSMR study using summary statistics from genome-wide association studies (GWAS) of methotrexate use and dementia. We obtained genetic instruments for methotrexate use from a large-scale GWAS meta-analysis and genetic instruments for dementia from a separate GWAS meta-analysis. We performed several statistical analyses, including inverse-variance weighted (IVW), weighted median (WM1), weighted mode (WM2), and MR-Egger regression methods, to estimate the causal effect of methotrexate on dementia risk. Our TSMR analysis showed a significant positive association between genetic predisposition to methotrexate use and dementia risk. The IVW method estimated a causal odds ratio (OR) of 0.476 [95% confidence interval (CI) 0.362-0.626] per unit increase in the log odds ratio of methotrexate use. WM1, WM2, and MR-Egger methods provided consistent results. The findings of this mendelian randomization (MR) study suggest a potential causal effect of methotrexate use on the risk of dementia. However, further research is needed to validate these findings and explore the underlying mechanisms. Since methotrexate is widely prescribed for various autoimmune diseases, a better understanding of its potential impact on dementia risk is crucial for optimizing treatment strategies and addressing potential adverse effects.