We aimed to investigate the impact of maternal vitamin D deficiency during pregnancy on insulin resistance in male offspring and examine its mechanism. Pregnant Sprague-Dawley rats were maintained on a vitamin-D-free diet with ultraviolet-free light during pregnancy (early-VDD group). Insulin resistance in the male offspring was assessed by HOMA-IR, OGTT and euglycaemic clamp. NEFA, oxidative stress and inflammation levels were estimated as risk factors for insulin resistance. DNA methylation was examined by bisulfate sequencing PCR analysis. Luciferase reporter assay was performed to validate the effect of DNA methylation. The offspring in the early-VDD group had significantly higher fasting insulin and HOMA-IR levels, markedly reduced glucose tolerance and significantly lower tissue sensitivity to exogenous insulin at 16 weeks (all p < 0.05) compared with control offspring. Significantly higher serum and liver IL-1β, IL-6, IL-8 and TNF-α concentrations were observed in the offspring of the early-VDD group at 0, 3, 8 and 16 weeks. Expression of hepatic Iκbα (also known as Nfkbia) mRNA and nuclear factor κB inhibitor α (IκBα) protein was persistently lower in the early-VDD offspring at all time points, and their hepatic Iκbα methylation levels at the cytosine phosphate guanine site +331 were significantly higher at 0 and 16 weeks (all p < 0.01). Methylation at Iκbα first exon +331 markedly decreased the luciferase activity (p < 0.05). Maternal vitamin D deficiency during pregnancy results in insulin resistance in the offspring, which is associated with persistently increased inflammation. Persistently decreased Iκbα expression, potentially caused by changes in Iκbα methylation, plays an important role in persistent inflammation.