The pattern of BDNF changes varied between T2DM, prediabetes, and control groups depending on cognitive impairment. Here, BDNF is linked to type 2 diabetes mellitus.