Background: Electroconvulsive therapy (ECT) is one of the most effective treatments for major depressive disorder. Recently, there has been increasing attention to evaluate the effect of ECT on resting-state functional magnetic resonance imaging (rs-fMRI). This study aims to compare rs-fMRI of depressive disorder (DEP) patients with healthy participants, investigate whether pre-ECT dynamic functional network connectivity network (dFNC) estimated from patients rs-fMRI is associated with an eventual ECT outcome, and explore the effect of ECT on brain network states.Method: Resting-state functional magnetic resonance imaging (fMRI) data were collected from 119 patients with depression or depressive disorder (DEP) (76 females), and 61 healthy (HC) participants (34 females), with an age mean of 52.25 (N = 180) years old. The pre-ECT and post-ECT Hamilton Depression Rating Scale (HDRS) were 25.59 ± 6.14 and 11.48 ± 9.07, respectively. Twenty-four independent components from default mode (DMN) and cognitive control network (CCN) were extracted, using group-independent component analysis from pre-ECT and post-ECT rs-fMRI. Then, the sliding window approach was used to estimate the pre-and post-ECT dFNC of each subject. Next, k-means clustering was separately applied to pre-ECT dFNC and post-ECT dFNC to assess three distinct states from each participant. We calculated the amount of time each subject spends in each state, which is called “occupancy rate” or OCR. Next, we compared OCR values between HC and DEP participants. We also calculated the partial correlation between pre-ECT OCRs and HDRS change while controlling for age, gender, and site. Finally, we evaluated the effectiveness of ECT by comparing pre- and post-ECT OCR of DEP and HC participants.Results: The main findings include (1) depressive disorder (DEP) patients had significantly lower OCR values than the HC group in state 2, where connectivity between cognitive control network (CCN) and default mode network (DMN) was relatively higher than other states (corrected p = 0.015), (2) Pre-ECT OCR of state, with more negative connectivity between CCN and DMN components, is linked with the HDRS changes (R = 0.23 corrected p = 0.03). This means that those DEP patients who spent less time in this state showed more HDRS change, and (3) The post-ECT OCR analysis suggested that ECT increased the amount of time DEP patients spent in state 2 (corrected p = 0.03).Conclusion: Our finding suggests that dynamic functional network connectivity (dFNC) features, estimated from CCN and DMN, show promise as a predictive biomarker of the ECT outcome of DEP patients. Also, this study identifies a possible underlying mechanism associated with the ECT effect on DEP patients.