Methyl-donor nutrients are substrates for methylation reactions involved in neurodevelopment processes. The role of maternal intake of these nutrients on cognitive performance of the offspring is poorly understood. We examined the associations of maternal intake of folate, vitamin B12, choline, betaine and methionine during the first and second trimesters of pregnancy, with tests of cognitive performance in the offspring at 3 years of age using data from 1210 participants in Project Viva, a prospective pre-birth cohort study in Massachusetts. We assessed nutrient intake with the use of food frequency questionnaires. Children's cognition at age 3 years was evaluated with the Peabody Picture Vocabulary Test III (PPVT-III) and visual-motor skills with the Wide Range Assessment of Visual Motor Abilities test. In multivariable models adjusting for potential sociobehavioural and nutritional confounders, for each 600 µg/day increment in total folate intake during the first trimester, PPVT-III score at age 3 years was 1.6 points [95% confidence interval (CI) 0.1, 3.1; P = 0.04] higher. There was a weak inverse association between vitamin B12 intake during the second trimester and PPVT-III scores [-0.4 points per 2.6 µg/day; 95% CI -0.8, -0.1; P = 0.01]. We did not find associations between choline, betaine or methionine and cognitive outcomes at this age. Results of this study suggest that higher intake of folate in early pregnancy is associated with higher scores on the PPVT-III, a test of receptive language that predicts overall intelligence, at age 3 years.