Obsessive-compulsive disorder (OCD) is a common neuropsychiatric disorder characterized by intrusive thoughts (obsessions) and repetitive behaviors (compulsions), and few studies have assessed the whole-brain functional connectivity architecture of OCD with electroencephalogram (EEG) during different resting states. Graph theory and network-based statistics (NBS) were employed to examine the neural synchronization and the whole-brain functional connectivity (FC) based on the phase-locking value (PLV) of OCD patients and healthy controls (HCs) during eyes-closed (EC) and eyes-open (EO) states. Compared with HCs, OCD patients exhibited not only decreased global synchronization in terms of phase synchrony but also aberrant global topological properties (decreased average shortest path lengths and normalized shortest path lengths together with increased global efficiencies and normalized clustering coefficients) together with inhibited intra-hemispheric and interhemispheric FCs during rest, which suggested an imbalance between functional integration and segregation of brain networks for OCD patients. Meanwhile, OCD patients had increased global efficiencies and normalized clustering coefficients, but decreased average clustering coefficients and normalized shortest path lengths together with significantly decreased FCs in the alpha band from EC to EO states, which suggested a dynamic switch between highly integrated (EC state) and highly specialized (EO state) modes of information processing. Moreover, the decreased FCs of OCD patients showed obvious hemispheric asymmetry within or between groups during EC and EO states, which might serve as a potential biomarker to classify OCD patients from HCs.