This meta-analysis aimed to compare the efficacy and safety of ketamine versus electroconvulsive therapy (ECT) in patients with major depressive disorder(MDD). A comprehensive literature search was conducted across PubMed, Embase, and Web of Science databases up to November 2024. The randomized controlled trials evaluating the efficacy and safety of ketamine and ECT in MDD patients were included. Pooled standardized mean differences (SMD) and risk ratios (RR) were calculated with 95% confidence intervals. The Cochrane's Risk of Bias Tool was employed to assess study quality. Six studies encompassing 643 patients were analyzed. No significant difference was observed in depression symptom severity scores between ketamine and ECT groups (SMD: -0.02, 95% CI: -0.53 to 0.48, P = 0.92). Response rates also showed no significant difference between the two interventions (RR: 1.08, 95% CI: 0.67 to 1.72, P = 0.76). Notably, ketamine demonstrated superior memory function improvement compared to ECT (SMD: 2.02, 95% CI: 1.64 to 2.48, P <
0.001). In terms of adverse events, ketamine was associated with significantly higher rates of dissociative symptoms, blurred vision, and dizziness(all P <
0.001), while demonstrating a lower incidence of muscle pain(P <
0.001). The meta-analysis revealed ketamine as a non-inferior therapeutic option for patients with major depressive disorder, with potential advantages in memory function. While promising, the limited number of included studies necessitates further large-scale randomized controlled trials using standardized assessment scales to validate these findings.