IMPORTANCE: Depression has been identified as a risk factor for dementia among patients with type 2 diabetes mellitus but the cognitive domains and patient groups most affected have not been identified. OBJECTIVE: To determine whether comorbid depression in patients with type 2 diabetes accelerates cognitive decline. DESIGN: A 40-month cohort study of participants in the Action to Control Cardiovascular Risk in Diabetes-Memory in Diabetes (ACCORD-MIND) trial. SETTING: Fifty-two clinics organized into 6 clinical networks across the United States and Canada. PARTICIPANTS: Two thousand nine hundred seventy-seven participants with type 2 diabetes at high risk for cardiovascular events. INTERVENTION: The Digit Symbol Substitution Test, Rey Auditory Verbal Learning Test, and the modified Stroop test were used to assess cognition. The 9-item Patient Health Questionnaire was used to assess depression. MAIN OUTCOMES AND MEASURES: Mixed-effects statistical models were used to analyze cognitive test outcomes incorporating depression as a time-dependent covariate. RESULTS: Participants with scores indicative of depression (9-item Patient Health Questionnaire, ≥10) showed greater cognitive decline during 40-month follow-up on all tests, with the following differences in estimated least squares means: Digit Symbol Substitution Test, 0.72 (95%CI, 0.25 to 1.19; P = .003), Rey Auditory Verbal Learning Test, 0.18 (95%CI, 0.07 to 0.29; P = .001), and Stroop interference, -1.06 (95%CI, -1.93 to -0.18; P = .02). This effect of depression on risk of cognitive decline did not differ according to previous cardiovascular disease; baseline cognition or age; or intensive vs standard glucose-lowering treatment, blood pressure treatment, lipid treatment, or insulin treatment. Addition of demographic and clinical covariates to models did not significantly change the cognitive decline associated with depression. CONCLUSIONS AND RELEVANCE: Depression in patients with type 2 diabetes was associated with greater cognitive decline in all domains, across all treatment arms, and in all participant subgroups assessed. Future randomized trials will be necessary to determine if depression treatment can lower the risk of cognitive decline in patients with diabetes.