Summary The association between helminth infection and cognitive and motor function was investigated in school-age children in Java, Indonesia. 432 children from 42 primary schools participated in the study. Children were stratified by age and sex into two age groups, 8–9 years and 11–13 years. Children infected with hookworm performed significantly worse than children without hookworm infection in 6 of the 14 cognitive or motor tests. After controlling for school (as a random effect) plus age, socio-economic status and parental education, sex, stunting (height-for-age < − 2sd), body mass index, haemoglobin concentration and the presence of A. lumbricoides and T. trichiura infections, infection with hookworm explained significantly lower scores on tests of Fluency (P < 0.01), Digit-Span Forwards (P < 0.01), Number Choice (P < 0.01), Picture Search (P < 0.03), Stroop Colour Word (P < 0.02) and Mazes (P < 0.001). In 4 of the 6-tests (Fluency, Number Choice, Picture Search and Mazes), there was a significant interaction between hookworm infection and age (P < 0.03), indicating that the association between hookworm and lower test scores increased with age. No associations were observed between hookworm infection and scores in tests of Digit-Span Backwards, Corsi-Block, Stroop Colour, Stroop Interference, Free Recall, Verbal Analogies, Bead Threading or the Pegboard (P > 0.05). Tests associated with helminths represented various functions of working memory. No significant associations between helminth infection and motor function were observed that could not be explained by chance. The results suggest that hookworm infection can have a significant adverse effect on children's working memory which may have consequences for a child's reasoning ability and reading comprehension. Although the results are only associational, the fact that differences in cognition were observed at baseline imply that preventing infection with helminths in school-age children could be of benefit.