Neural stem cells (NSCs) in the prenatal neocortex progressively generate different subtypes of glutamatergic projection neurons. Following that, NSCs have a major switch in their progenitor properties and produce $γ$-aminobutyric acid (GABAergic) interneurons for the olfactory bulb (OB), cortical oligodendrocytes, and astrocytes. Herein, we provide evidence for the molecular mechanism that underlies this switch in the state of neocortical NSCs. We show that, at around E16.5, mouse neocortical NSCs start to generate GSX2-expressing (GSX2(+)) intermediate progenitor cells (IPCs). In vivo lineage-tracing study revealed that GSX2(+) IPC population gives rise not only to OB interneurons but also to cortical oligodendrocytes and astrocytes, suggesting that they are a tri-potential population. We demonstrated that Sonic hedgehog signaling is both necessary and sufficient for the generation of GSX2(+) IPCs by reducing GLI3R protein levels. Using single-cell RNA sequencing, we identify the transcriptional profile of GSX2(+) IPCs and the process of the lineage switch of cortical NSCs.