Several studies show a modest beneficial effect of breastfeeding on cognitive development after controlling for sociodemographic confounders. It is still unclear, however, to what extent this is due to the nutritional advantage of breast milk or to environmental influences associated with breastfeeding. We compared verbal ability scores at age 8 years in 511 first-born offspring of the National Survey of Health and Development who were ever or never breastfed, adjusting for paternal occupation, maternal education, maternal cognitive performance, attendance at nursery school, and maternal age at birth of the participant. A positive association between breastfeeding and cognitive performance was found but this was no longer the case after adjusting for either paternal occupation, maternal education, or maternal cognitive performance in turn. In contrast, an association between breastfeeding and cognitive function was not found for mothers of these offspring. Breastfeeding was increasingly associated with a non-manual social class across the generations although it remains unclear how this might mediate the effect of breastfeeding on cognitive performance.