BackgroundContinuous glucose monitoring (CGM)-derived time in range (TIR) is closely associated with micro- and macrovascular complications in type 2 diabetes mellitus (T2DM). This study was performed to investigate the relationship between key CGM-derived metrics and specific cognitive domains in patients with T2DM.MethodsOutpatients with T2DM who were otherwise healthy were recruited for this study. A battery of neuropsychological tests was performed to evaluate cognitive function, including memory, executive functioning, visuospatial ability, attention, and language. Participants wore a blinded flash continuous glucose monitoring (FGM) system for 72 h. The key FGM-derived metrics were calculated, including TIR, time below range (TBR), time above range (TAR), glucose coefficient of variation (CV), and mean amplitude of glycemic excursions (MAGE). Furthermore, the glycemia risk index (GRI) was also calculated by the GRI formula. Binary logistic regression was used to assess risk factors for TBR, and we further analysed the associations between neuropsychological test results and key FGM-derived metrics with multiple linear regressions.ResultsA total of 96 outpatients with T2DM were recruited for this study, with 45.8% experiencing hypoglycemia (TBR< 3.9 mmol/L). Spearman analysis results revealed that a higher TBR< 3.9 mmol/Lwas correlated with worse performance on the Trail Making Test A (TMTA), Clock Drawing Test (CDT), and cued recall scores (P< 0.05). Logistic regression analysis results indicated that the TMTA (OR = 1.010,P= 0.036) and CDT (OR = 0.429,P= 0.016) scores were significant factors influencing the occurrence of TBR< 3.9 mmol/L. Multiple linear regressions further demonstrated that TBR< 3.9 mmol/L(β = -0.214,P= 0.033), TAR> 13.9 mmol/L(β = -0.216,P= 0.030) and TAR10.1–13.9 mmol/L(β = 0.206,P= 0.042) were significantly correlated with cued recall scores after adjusting for confounding factors. However, TIR, GRI, CV and MAGE showed no significant correlation with the results of neuropsychological tests (P> 0.05).ConclusionsA higher TBR< 3.9 mmol/Land TAR> 13.9 mmol/Lwere associated with worse cognitive functions (memory, visuospatial ability, and executive functioning). Conversely, a higher TAR of 10.1–13.9 mmol/L was associated with better memory performance in memory tasks.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12883-023-03242-2.