Intake of added sugars, mainly fructose and sucrose, has been associated with risk factors for cognitive impairment, such as obesity, the metabolic syndrome and type 2 diabetes. The objective of this analysis was to examine whether habitual intakes of total sugars, added sugars, sugar-sweetened beverages or sweetened solid foods are associated with cognitive function. The present study included 737 participants without diabetes, aged 45–75 years, from the Boston Puerto Rican Health Study, 2004–9. Cognitive function was measured with a battery of seven tests: Mini-Mental State Examination (MMSE), word list learning, digit span, clock drawing, figure copying, and Stroop and verbal fluency tests. Usual dietary intake was assessed with a validated FFQ. Greater intakes of total sugars, added sugars and sugar-sweetened beverages, but not of sugar-sweetened solid foods, were significantly associated with lower MMSE score, after adjusting for covariates. Adjusted OR for cognitive impairment (MMSE score < 24) were 2·23 (95 % CI 1·24, 3·99) for total sugars and 2·28 (95 % CI 1·26, 4·14) for added sugars, comparing the highest with lowest intake quintiles. Greater intake of total sugars was also significantly associated with lower word list learning score. In conclusion, higher sugar intake appears to be associated with lower cognitive function, but longitudinal studies are needed to clarify the direction of causality.