AimTo explore the relationship between inflammatory biomarkers and cognitive dysfunction in patients with type 1 diabetes mellitus (T1DM) and type 2 diabetes mellitus (T2DM).MethodsT1DM patients (n=32), T2DM patients (n=90) and age-matched controls (n=36 and 81, respectively) were included. The 72-hour dynamic blood glucose test and cognitive function, including visuoconstructive function, executive function, learning and memory, attention, language expression ability, and orientation, were analyzed. The head, body and tail grey matter of the hippocampus were analyzed by magnetic resonance spectroscopy. In addition, serum HMGB1, IL-1β, IL-6, and TNF-α concentrations were examined.ResultsHbA1C, MAGE and MODD were higher in T1DM patients than in T2DM patients (p<0.05). MoCA scores and IL-1β and IL-6 levels in patients with T2DM were higher than T1DM patients. NAA/Cr and Cho/Cr of the hippocampus were higher in patients with T1DM than in those with T2DM. Levels of inflammatory factors in T1DM and T2DM patients were higher than in nondiabetic subjects (p<0.05). Regression analysis showed that cognition was associated with MAGE, MODD, NAA/Cr of the left hippocampus and HMGB1 in T1DM patients, after adjustment for age, sex, BMI and other co-variables. In T2DM patients, cognitive impairment was associated with MAGE, NAA/Cr of the left hippocampus, HMGB1 and IL-6, after adjustment for co-variables such as sex, age and BMI.ConclusionT2DM patients have more cognitive impairment than T1DM patients. Changes in brain function connections and metabolites may be the structural basis of the differences in cognitive functional impairment. Inflammation is related to cognitive impairment in diabetes patients, especially in T2DM patients.