Diabetes mellitus has been associated with cognitive impairment but this has not been well investigated in sub-Saharan Africa. The aim of this study was to determine the prevalence and risk factors of cognitive dysfunction in patients with type 2 diabetes and to assess its influence on medication adherence. We carried out a cross-sectional study over a period of 4 months at the outpatient diabetes and endocrinology clinic of the Douala General Hospital. Consecutive patients with type 2 diabetes attending the clinic underwent cognitive assessment using the Mini Mental State Exam (MMSE). The patient Health Questionnaire-9 (PHQ-9) was used to rule out the confounding effect of depression, and the Morisky score was used to assess medication adherence. Data were analyzed using SPSS version 20 for Windows. Of the 223 participants (54.3% females) with a mean age of 56 ± 9.5 years, 33 (14.8%) had cognitive dysfunction (12.6, 1.8, and 0.4% having mild, moderate, and severe cognitive dysfunction, respectively). Level of education ≤7 years (OR = 5.314, 95% CI 2.443–11.561, p < 0.001) was the only factor significantly associated with cognitive dysfunction. No significant association was found between cognitive dysfunction and treatment adherence. In conclusion, one out of seven of our patients with type 2 diabetes have cognitive dysfunction, which is strongly associated with low level of education and does not affect treatment adherence and glycemic control. Our results suggest that screening for cognitive dysfunction in our patients should focus on patients with a low level of education.