Throughout development, the brain transits from early highly synchronous activity patterns to a mature state with sparse and decorrelated neural activity, yet the mechanisms underlying this process are unknown. The developmental transition has important functional consequences, as the latter state allows for more efficient storage, retrieval and processing of information. Here, we show that, in the mouse medial prefrontal cortex (mPFC), neural activity during the first two postnatal weeks decorrelates following specific spatial patterns. This process is accompanied by a concomitant tilting of excitation/inhibition (E-I) ratio towards inhibition. Using optogenetic manipulations and neural network modeling, we show that the two phenomena are mechanistically linked, and that a relative increase of inhibition drives the decorrelation of neural activity. Accordingly, in two mouse models of neurodevelopmental disorders, subtle alterations in E-I ratio are associated with specific impairments in the correlational structure of spike trains. Finally, capitalizing on EEG data from newborn babies, we show that an analogous developmental transition takes place also in the human brain. Thus, changes in E-I ratio control the (de)correlation of neural activity and, by these means, its developmental imbalance might contribute to the pathogenesis of neurodevelopmental disorders.