Abstract Background Using task-dependent neuroimaging techniques, recent studies discovered a fraction of patients with disorders of consciousness (DOC) who had no command-following behaviors but showed a clear sign of awareness, which was defined as cognitive motor dissociation (CMD). Although many efforts were made to identify the CMD, existing task-dependent approaches might fail when patients had multiple cognitive function (e.g., attention, memory) impairments, and thus lead to false-negative findings. However, recent advances in resting-state fMRI (rs-fMRI) analysis allow investigation of the dynamic change of spontaneous brain activity, which might be a powerful tool to test the patient’s cognitive functions, while its capacity in identifying CMD was unclear. Methods The rs-fMRI study included 119 participants from three independent research sites. A sliding-window approach was used to investigate the dynamic functional connectivity of the brain in two aspects: the global and regional temporal stability, which measures how stable the brain functional architecture is across time. The temporal stability was compared in the first dataset (36/16 DOC/controls), and then a Support Vector Machine (SVM) classifier was built to discriminate DOC patients from controls. Furthermore, the generalizability of the SVM classifier was tested in the second independent dataset (35/21 DOC/controls). Finally, the SVM classifier was applied to the third independent dataset where patients underwent an rs-fMRI and brain-computer interface assessment (4/7 CMD/potential non-CMD), to test its performance in identifying CMD. Results Our results showed that the global and regional temporal stability were impaired in DOC patients, especially in regions from the cingulo-opercular task control, default mode, fronto-parietal task control, and salience network. Using the temporal stability as features, the SVM model not only showed a good performance in the first dataset (accuracy = 90 %), but a good generalizability in the second dataset (accuracy = 82 %). Most importantly, the SVM model generalized well in identifying CMD in the third dataset (accuracy = 91 %). Conclusion The current findings suggested that rs-fMRI could be a potential tool to assist in diagnosing CMD. Furthermore, the temporal stability investigated in this study also contributed to a deeper understanding of the neural mechanism of the consciousness.