In this study, we aim to demonstrate the immunomodulatory mechanisms of maternal VitD on the offspring. We found that high maternal VitD levels rescue the abnormal immune phenotype caused by maternal immune activation (MIA), and inhibit the transformation of CD4+ T cells into a pro-inflammatory phenotype through a maternal VitD concentration-dependent regulation of metabolism and epigenetic reprogramming. Furthermore, we identified critical windows for maternal VitD regulation of offspring immunity, as well as the long-term impacts of MIA.