In a model with BDNF as a potential mediator, we found that total and direct effects of diabetes on MoCA were significant for PreDM and T2DM (p<0.05). This evidence concerns the gene BDNF and diabetes mellitus.