Background People with severe mental illness experience poorer health outcomes than the general population. Diabetes contributes significantly to this health gap. Objectives The objectives were to identify the determinants of diabetes and to explore variation in diabetes outcomes for people with severe mental illness. Design Under a social inequalities framework, a concurrent mixed-methods design combined analysis of linked primary care records with qualitative interviews. Setting The quantitative study was carried out in general practices in England (2000–16). The qualitative study was a community study (undertaken in the North West and in Yorkshire and the Humber). Participants The quantitative study used the longitudinal health records of 32,781 people with severe mental illness (a subset of 3448 people had diabetes) and 9551 ‘controls’ (with diabetes but no severe mental illness), matched on age, sex and practice, from the Clinical Practice Research Datalink (GOLD version). The qualitative study participants comprised 39 adults with diabetes and severe mental illness, nine family members and 30 health-care staff. Data sources The Clinical Practice Research Datalink (GOLD) individual patient data were linked to Hospital Episode Statistics, Office for National Statistics mortality data and the Index of Multiple Deprivation. Results People with severe mental illness were more likely to have diabetes if they were taking atypical antipsychotics, were living in areas of social deprivation, or were of Asian or black ethnicity. A substantial minority developed diabetes prior to severe mental illness. Compared with people with diabetes alone, people with both severe mental illness and diabetes received more frequent physical checks, maintained tighter glycaemic and blood pressure control, and had fewer recorded physical comorbidities and elective admissions, on average. However, they had more emergency admissions (incidence rate ratio 1.14, 95% confidence interval 0.96 to 1.36) and a significantly higher risk of all-cause mortality than people with diabetes but no severe mental illness (hazard ratio 1.89, 95% confidence interval 1.59 to 2.26). These paradoxical results may be explained by other findings. For example, people with severe mental illness and diabetes were more likely to live in socially deprived areas, which is associated with reduced frequency of health checks, poorer health outcomes and higher mortality risk. In interviews, participants frequently described prioritising their mental illness over their diabetes (e.g. tolerating antipsychotic side effects, despite awareness of harmful impacts on diabetes control) and feeling overwhelmed by competing treatment demands from multiple morbidities. Both service users and practitioners acknowledged misattributing physical symptoms to poor mental health (‘diagnostic overshadowing’). Limitations Data may not be nationally representative for all relevant covariates, and the completeness of recording varied across practices. Conclusions People with severe mental illness and diabetes experience poorer health outcomes than, and deficiencies in some aspects of health care compared with, people with diabetes alone. Future work These findings can inform the development of targeted interventions aimed at addressing inequalities in this population. Study registration National Institute for Health Research (NIHR) Central Portfolio Management System (37024); and ClinicalTrials.gov NCT03534921. Funding This project was funded by the NIHR Health Services and Delivery Research programme and will be published in full in Health Services and Delivery Research; Vol. 9, No. 10. See the NIHR Journals Library website for further project information.