Owing to recent medical and technological advances in neonatal care, infants born extremely premature have increased survival rates1,2. After birth, these infants are at high risk of hypoxic episodes because of lung immaturity, hypotension and lack of cerebral-flow regulation, and can develop a severe condition called encephalopathy of prematurity3. Over 80% of infants born before post-conception week 25 have moderate-to-severe long-term neurodevelopmental impairments4. The susceptible cell types in the cerebral cortex and the molecular mechanisms underlying associated gray-matter defects in premature infants remain unknown. Here we used human three-dimensional brain-region-specific organoids to study the effect of oxygen deprivation on corticogenesis. We identified specific defects in intermediate progenitors, a cortical cell type associated with the expansion of the human cerebral cortex, and showed that these are related to the unfolded protein response and changes. Moreover, we verified these findings in human primary cortical tissue and demonstrated that a small-molecule modulator of the unfolded protein response pathway can prevent the reduction in intermediate progenitors following hypoxia. We anticipate that this human cellular platform will be valuable for studying the environmental and genetic factors underlying injury in the developing human brain.