While it is known that associative memory is preferentially encoded by memory-eligible "primed" neurons, in vivo neural activity hierarchy has not been quantified and little is known about how such a hierarchy is established. Leveraging in vivo calcium imaging of hippocampal neurons on freely behaving mice, we developed the first method to quantify real-time neural activity hierarchy in the CA1 region. Neurons on the top of activity hierarchy are identified as primed neurons. In cilia knockout mice that exhibit severe learning deficits, the percentage of primed neurons is drastically reduced. We developed a simplified neural network model that incorporates simulations of linear and non-linear weighted components, modeling the synaptic ionic conductance of AMPA and NMDA receptors, respectively. We found that moderate non-linear to linear conductance ratios naturally leads a small fraction of neurons to be primed in the simulated neural network. Removal of the non-linear component eliminates the existing activity hierarchy and reinstate it to the network stochastically primes a new pool of neurons. Blockade of NMDA receptors by ketamine not only decreases general neuronal activity causing learning impairments, but also disrupts neural activity hierarchy. Additionally, ketamine-induced super-synchronized slow oscillation during anesthesia can be simulated if the non-linear NMDAR component is removed to flatten activity hierarchy. Together, this study develops a unique method to measure neural activity hierarchy and identifies NMDA receptors as a key factor that controls the hierarchy. It presents the first evidence suggesting that hierarchy disruption by NMDAR blockade causes dissociation and psychosis.