background Millions of children in low-income and middle-income countries (LMICs) are at risk of not reaching their full cognitive potential. Malnutrition and enteric infections in early life are implicated as risk factors; however, most studies on these risks and their associations with cognitive development have failed to adequately account for confounding factors or the accumulation of putative insults. Here, we examine the interaction between infections and illness on cognitive development in LMIC community settings. Methods As part of the Etiology, Risk Factors, and Interactions of Enteric Infections and Malnutrition and the Consequences for Child Health and Development (MAL-ED) longitudinal birth cohort study, children from eight LMICs were followed from birth to 24 months to understand the influence of repeated enteric infections on child growth and development. Here, data from six sites were employed to evaluate associations between infection, illness, the home environment, micronutrient intake and status, maternal reasoning, and cognitive development at 24 months. results Higher rates of enteropathogen detection and days with illness were associated with lower haemoglobin concentrations, which in turn were associated with lower cognitive scores at 24 months. Children with lower environmental health/safety scores and lower intakes of vitamin B 6 and folate had more enteropathogen detections and illness. Strength of associations varied by weight-for-age in the first 17 days of life; lower weight infants were more susceptible to the negative effects of enteropathogens and illness. Conclusions Enteropathogens were negatively related to child cognitive development. However, other factors were more strongly associated with child cognition. Targeting of interventions to improve cognitive development should include a focus on reducing frequency of illness, improving the safety and healthfulness of the child's environment, and improving dietary intake.