Chocolate and cocoa flavanols have been associated with improvements in a range of health complaints dating from ancient times, and has established cardiovascular benefits. Less is known about the effects of chocolate on neurocognition and behaviour. The aim of this study was to investigate whether chocolate intake was associated with cognitive function, with adjustment for cardiovascular, lifestyle and dietary factors. Cross-sectional analyses were undertaken on 968 community-dwelling participants, aged 23–98 years, from the Maine-Syracuse Longitudinal Study (MSLS). Habitual chocolate intake was related to cognitive performance, measured with an extensive battery of neuropsychological tests. More frequent chocolate consumption was significantly associated with better performance on the Global Composite score, Visual-Spatial Memory and Organization, Working Memory, Scanning and Tracking, Abstract Reasoning, and the Mini-Mental State Examination. With the exception of Working Memory, these relations were not attenuated with statistical control for cardiovascular, lifestyle and dietary factors. Prospective analyses revealed no association between cognitive function and chocolate intake measured up to 18 years later. Further intervention trials and longitudinal studies are needed to explore relations between chocolate, cocoa flavanols and cognition, and the underlying causal mechanisms.