End organ injury in diabetes mellitus (DM) is driven by microvascular compromise (including diabetic retinopathy and nephropathy). Cognitive impairment is a well-known complication of DM types 1 and 2; however, its mechanism(s) is(are) not known. We hypothesized that blood-brain barrier (BBB) compromise plays a key role in cognitive decline in DM. Using a DM type 1 model (streptozotocin injected C57BL/6 mice) and type 2 model (leptin knockout obese db/db mice), we showed enhanced BBB permeability and memory loss (Y maze, water maze) that are associated with hyperglycemia. Gene profiling in isolated microvessels from DM type 1 animals demonstrated deregulated expression of 54 genes related to angiogenesis, inflammation, vasoconstriction/vasodilation, and platelet activation pathways by at least 2-fold (including eNOS, TNFα, TGFβ1, VCAM-1, E-selectin, several chemokines, and MMP9). Further, the magnitude of gene expression was linked to degree of cognitive decline in DM type 1 animals. Gene analysis in brain microvessels of DM type 2 db/db animals showed alterations of similar genes as in DM 1 model, some to an even greater extent. Neuropathologic analyses of brain tissue derived from DM mice showed microglial activation, expression of ICAM-1, and attenuated coverage of pericytes compared to controls. There was a significant upregulation of inflammatory genes in brain tissue in both DM models. Taken together, our findings indicate that BBB compromise in DM in vivo models and its association with memory deficits, gene alterations in brain endothelium, and neuroinflammation. Prevention of BBB injury may be a new therapeutic approach to prevent cognitive demise in DM.