The association between egg consumption and cognitive function is inclusive. We aimed to assess the association between egg consumption and cognitive function in Chinese adults and tested the interaction between egg consumption and Fe intake. The data used were from a nationwide sample (n 4852, age ≥ 55 years) from the China Health and Nutrition Survey between 1991 and 2006. Assessment of cognitive function was conducted in 1997, 2000, 2004 and 2006. Dietary egg intake was obtained by 24-h dietary recalls of 3 consecutive days during home visits between 1991 and 2006. Multivariable mixed linear regression and logistic regression were used. Egg intake was positively associated with global cognitive function. In fully adjusted models, across the quartiles of egg intake the regression coefficients were 0, 0·11 (95 % CI –0·28, 0·51), 0·79 (95 % CI 0·36, 1·22) and 0·92 (95 % CI 0·43, 1·41), respectively. There was a significant interaction between egg intake and Fe intake. The association between high egg intake and cognitive function was stronger among those with low Fe intake than those with high Fe intake. In addition, there was a significant interaction between egg consumption and sex, with the association mainly observed in women but not men. Furthermore, compared with non-consumers, those with higher egg consumption (Q4) had the OR of 0·93 (95 % CI 0·74, 1·19), 0·84 (95 % CI 0·69, 1·02) for self-reported poor memory and self-reported memory decline, respectively. Higher egg intake is associated with better cognition in Chinese adults among those with low Fe intake.