Abstract:Objective To evaluate the effect of modified electroconvulsive therapy (MECT) on sleep quality in patients with treatment-resistant depression (TRD).Methods From June 2024 to June 2025, 120 patients diagnosed with TRD were recruited and randomly allocated by the envelope method into a control group (n = 60) and an MECT group (n = 60). The control group was treated with standardized antidepressant medication, while the MECT group received MECT in addition to the same regimen. Post-treatment comparisons were made between the two groups with respect to overall clinical efficacy, severity of depressive symptoms, sleep quality, serum levels of 5-hydroxytryptamine (5-HT), brain-derived neurotrophic factor (BDNF) and inflammatory cytokines, and quality of life.Results The MECT group showed a higher overall effective rate than the control group (P < 0.05). After treatment, the scores of the Hamilton Depression Scale (HAMD) and Pittsburgh Sleep Quality Index (PSQI) in the MECT group were lower than those in the control group (P < 0.05). The differences in HAMD and PSQI scores before and after treatment in the MECT group were greater than those in the control group (P < 0.05). After treatment, the levels of 5-HT and BDNF in the MECT group were higher than those in the control group (P < 0.05). The differences in 5-HT and BDNF levels before and after treatment in the MECT group were greater than those in the control group (P < 0.05). After treatment, the levels of C-reactive protein (CRP), interleukin-17 (IL-17), and interleukin-8 (IL-8) in the MECT group were lower than those in the control group (P < 0.05). The differences in CRP, IL-17, and IL-8 levels before and after treatment in the MECT group were greater than those in the control group (P < 0.05). After treatment, the score of the Generic Quality of Life Inventory-74 (GQOLI-74) in the MECT group was higher than that in the control group (P < 0.05). The difference in GQOLI-74 scores before and after treatment in the MECT group was greater than that in the control group (P < 0.05).Conclusion MECT produces notable improvements in both therapeutic effectiveness and sleep quality among patients with TRD.