ABSTRACT: Diabetes during pregnancy has been shown to affect the central nervous system (CNS) of the offspring, resulting in short- and long-term adverse effects. Children of diabetic mothers are more likely to develop cognitive impairment, also having increased susceptibility to psychiatric disorders. Microglia, the immune cells of the CNS, work as sensors of environmental changes, namely metabolic challenges, as early as the intrauterine period. During this period, microglia is actively involved in processes of neurogenesis, synaptic pruning and detection of any environmental alteration that may impact brain development. The remarkable sex dimorphism in neurodevelopment, as well as sex differences in the morphology and immune function of microglia during development, led us to clarify if maternal diabetes affects specific behavioral traits and microglia morphology during infancy in a sex-specific manner. Another important goal of this study was to clarify if insulin, the gold standard treatment of diabetes during gestation, could prevent maternal diabetes-induced behavioral changes, as well as microglia morphology, also considering sex specificities. Other molecular and cellular players potentially involved in the link between changes in metabolism and behavior were also analyzed in the hippocampus, a brain region implicated in cognition and other behavioral outcomes. Diabetes during pregnancy globally delayed female and male offspring development and was associated with impairments in recognition memory, but only in female offspring. In line with these results, at early and late infancy, some molecular and cellular markers were altered in offspring hippocampus in a sex-specific manner. The strict control of glycemia by insulin during pregnancy prevented most of the negative effects induced by uncontrolled hyperglycemia. Notably, insulin administration to diabetic dams may also modulate offspring development in a way that differs from what is observed in physiological conditions, since it promoted the expedited acquisition of developmental milestones and of discrimination ability at memory test, also inducing a hyper-ramification of male and female hippocampal microglia. Importantly, this study highlights the importance of analyzing the impact of maternal diabetes and insulin therapy, taking into account sex differences, since male and female present different vulnerabilities to hyperglycemia in this critical period of life.