Growing epidemiologic evidence has suggested that people with diabetes mellitus are at an increased risk for the development of dementia. However, the results for the subtypes of dementia are inconsistent. This review examines the risk of dementia in people with diabetes mellitus, and discusses the possible mechanism underpinning this association. Diabetes mellitus is associated with a 1.5- to 2.5-fold greater risk of dementia among community-dwelling elderly people. Notably, diabetes mellitus is a significant risk factor for not only vascular dementia, but also Alzheimer's disease. The mechanisms underpinning the association are unclear, but it may be multifactorial in nature, involving factors such as cardiovascular risk factors, glucose toxicity, changes in insulin metabolism and inflammation. The optimal management of these risk factors in early life may be important to prevent late-life dementia. Furthermore, novel therapeutic strategies will be needed to prevent or reduce the development of dementia in people with diabetes mellitus.