The brain can become transiently disconnected from the environment while maintaining vivid, internally generated experiences. This so-called dissociated state can occur in pathological conditions and under the influence of psychedelics or the anesthetic ketamine (KET). The cellular and circuit mechanisms producing the dissociative state remain poorly understood. We show in mice that KET causes spontaneously active neurons to become suppressed while previously silent neurons become spontaneously activated. This switch occurs in all cortical layers and different cortical regions, is induced by both systemic and cortical application of KET and is mediated by suppression of parvalbumin and somatostatin interneuron activity and inhibition of NMDA receptors and HCN channels. Combined, our results reveal two largely non-overlapping cortical neuronal populations-one engaged in wakefulness, the other contributing to the KET-induced brain state-and may lay the foundation for understanding how the brain might become disconnected from the surrounding environment while maintaining internal subjective experiences.