Prenatal glucocorticoid exposure causes brain damage in adult offspring; however, the underlying mechanisms remain unclear. Melatonin has been shown to have beneficial effects in compromised pregnancies. Pregnant Sprague-Dawley rats were administered vehicle (VEH) or dexamethasone between gestation days 14 and 21. The programming effects of prenatal dexamethasone exposure on the brain were assessed at postnatal days (PND) 7, 42, and ∼120. Melatonin was administered from PND21 to the rats exposed to dexamethasone, and the outcome was assessed at ∼PND120. In total, there were four groups: VEH, vehicle plus melatonin (VEHM), prenatal dexamethasone-exposure (DEX), and prenatal dexamethasone exposure plus melatonin (DEXM). Spatial memory, gross hippocampal morphology, and hippocampal biochemistry were examined. Spatial memory assessed by the Morris water maze showed no significant differences among the four groups. Brain magnetic resonance imaging showed that all rats with prenatal dexamethasone exposure (DEX + DEXM) exhibited increased T2-weighted signals in the hippocampus. There were no significant differences in the levels of mRNA expression of hippocampal reln, which encodes reelin, and GAD1, which encodes glutamic acid decarboxylase 67, at PND7. At both PND42 and ∼PND120, reln and GAD1 mRNA expression levels were decreased. At ∼PND120, melatonin restored the reduced levels of hippocampal reln and GAD1 mRNA expression in the DEXM group. In addition, melatonin restored the reln mRNA expression levels by (1) reducing DNA methyltransferase 1 (DNMT1) mRNA expression and (2) reducing the binding of DNMT1 and the methyl-CpG binding protein 2 (MeCP2) to the reln promoter. The present study showed that prenatal dexamethasone exposure induced gross alterations in hippocampal morphology and reduced the levels of hippocampal mRNA expression of reln and GAD1. Spatial memory was unimpaired. Thus, melatonin had a beneficial effect in restoring hippocampal reln mRNA expression by reducing DNMT1 and MeCP2 binding to the reln p romoter.