Background. Developmental origin of health and disease states that an adverse intrauterine environment can lead to different diseases in later life. In this study, we aimed to explore the effect of maternal pregestational diabetes on the fetal brain activity using magnetoencephalography (MEG). Methods. Forty participants were included in an observational study with 9 type 1 and 19 type 2 diabetic pregnant women compared with data from 12 nondiabetic participants. Spontaneous fetal MEG signals were recorded and power spectral density was computed in 4 standard frequency bands. Group differences were investigated using analysis of covariance. Results. Our results showed that type 1 group was significantly different (P < .05) from the reference group for 3 of the 4 brain activity frequency bands, while in type 2 group, 2 bands exhibited this trend. When dichotomized based on the maternal glycemic control, significant differences in all bands were observed between the poor-control and reference groups. Conclusion. The fetal background brain activity parameters appear to be altered in diabetic pregnancy in comparison with the reference low-risk group. The study showed that maternal pregestational diabetes could potentially influence in utero neurodevelopment.