Immunoprophylaxis has not completely eliminated hepatitis B virus (HBV) infection due to hyporesponsiveness to hepatitis B vaccine (HepB). We explored the impact of folic acid supplementation (FAS) in pregnant women with positive hepatitis B surface antigen (HBsAg) on their infant hepatitis B surface antibody (anti-HBs) and the mediation effect of infant interleukin-4 (IL-4). We recruited HBsAg-positive mothers and their neonates at baseline. Maternal FAS was obtained via a questionnaire, and neonatal anti-HBs and IL-4 were detected. Follow-up was performed at 11-13 months of age of infants, when anti-HBs and IL-4 were measured. We applied univariate and multivariate analyses. A mediation effect model was performed to explore the mediating role of IL-4. A total of 399 mother-neonate pairs were enrolled and 195 mother-infant pairs were eligible for this analysis. The infant anti-HBs geometric mean concentrations in the maternal FAS group were significnatly higher than those in the no-FAS group (383·8 mIU/ml, 95 % CI: 294·2 mIU/ml to 500·7 mIU/ml v. 217·0 mIU/ml, 95 % CI: 147·0 mIU/ml to 320·4 mIU/ml, z = -3·2, P = 0·001). Infants born to women who took folic acid (FA) within the first trimester were more likely to have high anti-HBs titres (adjusted β-value = 194·1, P = 0·003). The fold change in IL-4 from neonates to infants partially mediated the beneficial influence of maternal FAS on infant anti-HBs (24·7 % mediation effect) after adjusting for confounding factors. FAS during the first trimester to HBsAg-positive mothers could facilitate higher anti-HBs levels in infants aged 11-13 months partly by upregulating IL-4 in infants.