The association of folate supplementation with congenital heart disease (CHD) prevention is controversial. To examine the association of maternal serum folate levels at early to midpregnancy with CHD risk in offspring. This case-control study recruited participants from one of China's largest cardiac referral centers between 2015 and 2018. CHD cases and non-CHD controls were matched according to maternal age at a ratio of 1:4. Data were analyzed from May to August 2023. Maternal serum levels of folate, vitamin B12, and homocysteine were measured around the gestational age of 16 weeks. The primary outcome was CHD, which was confirmed using echocardiography. The association between CHD risk in offspring with maternal folate levels was measured using adjusted odds ratios (aORs) with 95% CIs in conditional logistic regression analyses. Interactions between folate, vitamin B12, and homocysteine and CHD were estimated on a multiplicative scale. A total of 129 CHD cases with ventricular septal defect as the most common phenotype and 516 matched controls were included. The mean (SD) maternal age at pregnancy was 31.6 (5.3) years. There was a U-shaped association between maternal serum folate levels at early to midpregnancy and CHD risk in offspring. Compared with the offspring in the second and third quartiles of maternal folate, those in the lowest (aOR, 3.09; 95% CI, 1.88-5.08) and highest quartiles (OR, 1.81; 95% CI, 1.07-3.06) had increased odds of CHD. The ORs were higher when applying the World Health Organization criteria to determine the normal range for serum folate levels. Interaction analyses suggested that the adverse associations between low and high maternal folate and CHD risk might be further magnified by vitamin B12 deficiency or elevated homocysteine. In this case-control study of CHD, low maternal serum folate levels in early to midpregnancy were associated with an increased CHD risk in offspring, and excessively high folate levels were also associated with an elevated CHD risk. Further investigation is needed to make causal inferences for the observed associations and elucidate the underlying mechanisms.