Aims/hypothesisType 2 diabetes is associated with increased risk of cognitive decline although the pathogenic basis for this remains obscure. Deciphering diabetes-linked molecular mechanisms in cells of the cerebral cortex could uncover novel therapeutic targets.MethodsSingle-cell transcriptomic sequencing (scRNA-seq) was conducted on the cerebral cortex in a mouse model of type 2 diabetes (db/dbmice) and in non-diabetic control mice in order to identify gene expression changes in distinct cell subpopulations and alterations in cell type composition. Immunohistochemistry and metabolic assessment were used to validate the findings from scRNA-seq and to investigate whether these cell-specific dysfunctions impact the neurovascular unit (NVU). Furthermore, the behavioural and cognitive alterations related to these dysfunctions indb/dbmice were assessed via Morris water maze and novel object discrimination tests. Finally, results were validated in post-mortem sections and protein isolates from individuals with type 2 diabetes.ResultsCompared with non-diabetic control mice, thedb/dbmice demonstrated disrupted brain function as revealed by losses in episodic and spatial memory and this occurred concomitantly with dysfunctional NVU, neuronal circuitry and cerebral atrophy. scRNA-seq ofdb/dbmouse cerebral cortex revealed cell population changes in neurons, glia and microglia linked to functional regulatory disruption including neuronal maturation and altered metabolism. These changes were validated through immunohistochemistry and protein expression analysis not just in thedb/dbmouse cerebral cortex but also in post-mortem sections and protein isolates from individuals with type 2 diabetes (74.3 ± 5.5 years) compared with non-diabetic control individuals (87.0 ± 8.5 years). Furthermore, metabolic and synaptic gene disruptions were evident in cortical NVU cell populations and associated with a decrease in vascular density.Conclusions/interpretationTaken together, our data reveal disruption in the cellular and molecular architecture of the cerebral cortex induced by diabetes, which can explain, at least in part, the basis for progressive cognitive decline in individuals with type 2 diabetes.Data availabilityThe single-cell sequencing data that supports this study are available at GEO accession GSE217665 (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE217665).Graphical AbstractSupplementary InformationThe online version contains peer-reviewed but unedited supplementary material available at 10.1007/s00125-023-05935-2.