Diet supplies the nutrients needed for the development of neural tissues that occurs over the first 2 years of life. Our aim was to examine associations between dietary patterns at 6, 15 and 24 months and intelligence quotient (IQ) scores at 8 years. Participants were enrolled in an observational birth cohort (ALSPAC study, n = 7,097). Dietary data was collected by questionnaire and patterns were extracted at each time using principal component analysis. IQ was measured using the Wechsler Intelligence Scale for Children at 8 years. Associations between dietary patterns and IQ were examined in regression analyses adjusted for potential confounding and by propensity score matching, with data imputation for missing values. At all ages, higher scores on a Discretionary pattern (characterized by biscuits, chocolate, sweets, soda, crisps) were associated with 1-2 point lower IQ. A Breastfeeding pattern at 6 months and Home-made contemporary patterns at 15 and 24 months (herbs, legumes, cheese, raw fruit and vegetables) were associated with 1-to-2 point higher IQ. A Home-made traditional pattern (meat, cooked vegetables, desserts) at 6 months was positively associated with higher IQ scores, but there was no association with similar patterns at 15 or 24 months. Negative associations were found with patterns characterized by Ready-prepared baby foods at 6 and 15 months and positive associations with a Ready-to-eat foods pattern at 24 months. Propensity score analyses were consistent with regression analyses. This study suggests that dietary patterns from 6 to 24 months may have a small but persistent effect on IQ at 8 years.