Despite the potential adverse effects of maternal sleep deprivation (MSD) on physiological and behavioral aspects of offspring, the mechanisms remain poorly understood. The present study was intended to investigate the roles of microglia on neurodevelopment and cognition in young offspring rats with prenatal sleep deprivation. Pregnant Wistar rats received 72 h sleep deprivation in the last trimester of gestation, and their prepuberty male offspring were given the intraperitoneal injection with or without minocycline. The results showed the number of Iba1(+) microglia increased, that of hippocampal neurogenesis decreased, and the hippocampus-dependent spatial learning and memory were impaired in MSD offspring. The classical microglial activation markers (M1 phenotype) IL-1β, IL-6, TNF-α, CD68 and iNOS were increased, while the alternative microglial activation markers (M2 phenotype) Arg1, Ym1, IL-4, IL-10 and CD206 were reduced in hippocampus of MSD offspring. After minocycline administration, the MSD offspring showed improvement in MWM behaviors and increase in BrdU(+)/DCX(+) cells. Minocycline reduced Iba1(+) cells, suppressed the production of pro-inflammatory molecules, and reversed the reduction of M2 microglial markers in the MSD prepuberty offspring. These results indicate that dysregulation in microglial pro- and anti-inflammatory activation is involved in MSD-induced inhibition of neurogenesis and impairment of spatial learning and memory.