Studies on the relationships between metal mixtures exposure and cognitive impairment in elderly individuals are limited, particularly the mechanism with metabolite. Few studies are available on the potential sex and age specific associations between metal exposure, metabolites and cognitive impairment. We examined plasma metal and blood metabolite concentrations among 1068 urban elderly participants. Statistical analysis included a battery of variable selection approaches, logistic regression for metal/metabolite associations, and Bayesian kernel machine regression (BKMR) to identify mixed effects of metals/metabolites on cognitive impairment risk. Our results showed that As was positively associated with cognitive impairment in the female (OR 95 % CI = 2.21 (1.36, 3.57)) and 60- to 70-year-old (OR 95 % CI = 2.60 (1.54, 4.41)) groups, Cr was positively associated with cognitive impairment in the male (OR 95 % CI = 2.15 (1.27, 3.63)) and 60- to 70-year-old (OR 95 % CI = 2.10 (1.24, 3.57)) groups, and Zn was negatively associated with cognitive impairment, especially in the female (OR 95 % CI = 0.46 (0.25, 0.84)), 60- to 70-year-old (OR 95 % CI =0.24 (0.12, 0.45)) and ≥ 80-year-old (OR 95 % CI = 0.19 (0.04, 0.86)) groups. Positive associations were observed between combined metals (Cr, Cu and As) and cognitive impairment, but Zn alleviated this tendency, especially in elderly individuals aged ≥80 years. Negative associations were observed between metabolites and cognitive impairment, especially in male, female and 60–70 years old groups. The mediation effects of metabolites on the association between metal exposure and cognitive impairment were observed, and the percentages of these effects were 15.60 % (Glu-Cr), 23.00 % (C5:1-Cu) and 16.36 % (Glu-Zn). Cr, Cu, and Zn could increase cognitive impairment risk through the “Malate−Aspartate Shuttle”, “Glucose−Alanine Cycle”, etc., pathways. Overall, we hypothesize that metabolites have mediation effects on the relationship between multi-metal exposure and cognitive impairment and that there are sex and age differences.