BackgroundDementia and diabetes mellitus are common long-term conditions that coexist in a large number of older people. People living with dementia and diabetes may be at increased risk of complications such as hypoglycaemic episodes because they are less able to manage their diabetes.ObjectivesTo identify the key features or mechanisms of programmes that aim to improve the management of diabetes in people with dementia and to identify areas needing further research.DesignRealist review, using an iterative, stakeholder-driven, four-stage approach. This involved scoping the literature and conducting stakeholder interviews to develop initial programme theories, systematic searches of the evidence to test and develop the theories, and the validation of programme theories with a purposive sample of stakeholders.ParticipantsTwenty-six stakeholders (user/patient representatives, dementia care providers, clinicians specialising in dementia or diabetes and researchers) took part in interviews and 24 participated in a consensus conference.Data sourcesThe following databases were searched from 1990 to March 2016: MEDLINE (PubMed), Cumulative Index to Nursing and Allied Health Literature, Scopus, The Cochrane Library (including the Cochrane Database of Systematic Reviews), Database of Abstracts of Reviews of Effects, the Health Technology Assessment (HTA) database, NHS Economic Evaluation Database, AgeInfo (Centre for Policy on Ageing – UK), Social Care Online, the National Institute for Health Research (NIHR) portfolio database, NHS Evidence, Google (Google Inc., Mountain View, CA, USA) and Google Scholar (Google Inc., Mountain View, CA, USA).ResultsWe included 89 papers. Ten papers focused directly on people living with dementia and diabetes, and the rest related to people with dementia or diabetes or other long-term conditions. We identified six context–mechanism–outcome (CMO) configurations that provide an explanatory account of how interventions might work to improve the management of diabetes in people living with dementia. This includes embedding positive attitudes towards people living with dementia, person-centred approaches to care planning, developing skills to provide tailored and flexible care, regular contact, family engagement and usability of assistive devices. A general metamechanism that emerges concerns the synergy between an intervention strategy, the dementia trajectory and social and environmental factors, especially family involvement. A flexible service model for people with dementia and diabetes would enable this synergy in a way that would lead to the improved management of diabetes in people living with dementia.LimitationsThere is little evidence relating to the management of diabetes in people living with dementia, although including a wider literature provided opportunities for transferable learning. The outcomes in our CMOs are largely experiential rather than clinical. This reflects the evidence available. Outcomes such as increased engagement in self-management are potential surrogates for better clinical management of diabetes, but this is not proven.ConclusionsThis review suggests that there is a need to prioritise quality of life, independence and patient and carer priorities over a more biomedical, target-driven approach. Much current research, particularly that specific to people living with dementia and diabetes, identifies deficiencies in, and problems with, current systems. Although we have highlighted the need for personalised care, continuity and family-centred approaches, there is much evidence to suggest that this is not currently happening. Future research on the management of diabetes in older people with complex health needs, including those with dementia, needs to look at how organisational structures and workforce development can be better aligned to the needs of people living with dementia and diabetes.Study registrationThis study is registered as PROSPERO CRD42015020625.FundingThe NIHR HTA programme.