Existing evidence supported that congenital heart defect (CHD) was associated with a combination of environmental and genetic factors. Based on this, this study aimed at assessing the association of maternal folic acid supplementation (FAS), genetic variations in offspring methylenetetrahydrofolate dehydrogenase (MTHFD)1 and MTHFD2 genes, and their interactions with CHD and its subtypes. A hospital-based case-control study, including 620 cases with CHD and 620 healthy children, was conducted. This study showed that the absence of FAS was significantly associated with an increased risk of total CHD and its subtypes, such as atrial septal defect (ASD). FAS during the first and second trimesters was associated with a significantly higher risk of CHD in offspring compared to FAS during the three months prior to conception. The polymorphisms of offspring MTHFD1 and MTHFD2 genes at rs2236222, rs11849530, and rs828858 were significantly associated with the risk of CHD. Additionally, a significantly positive interaction between maternal FAS and genetic variation at rs828858 was observed for the risk of CHD. These findings suggested that pregnant women should carefully consider the timing of FAS, and individuals with higher genetic risk may benefit from targeted folic acid supplementation as a preventive measure against CHD.