AIMS To analyse depression in German type 2 diabetes patients with or without diabetes complications. METHODS Longitudinal data from nationwide general practices in Germany (n=1,202) were analysed. People initially diagnosed with type 2 diabetes (2004-2013) were identified and 90,412 patients were included (age: 65.5 years, SD: 11.7). The main outcome measure was the first diagnosis of depression (ICD 10: F32, F33) within ten years after index date in patients with and without diabetes complications. Cox proportional hazards models were used to adjust for confounders. RESULTS At baseline, most patients had diabetes complications and 6.4% of them had private insurance. Ten years after type 2 diabetes diagnosis, 30.3% of patients showed symptoms of depression. The prevalence of depression was higher in women than in men (33.7% versus 26.8%), in patients with high HbA1c levels (31.3% when Hb1Ac ≥ 9 versus 27.5% when HbA1c < 7) and in patients with diabetes complications (37.7% when there were more than two complications versus 29.1% when there were no complications). Women and patients without private health insurance were at a higher risk of developing depression. Retinopathy, neuropathy, nephropathy, coronary heart disease, stroke and HbA1c levels higher than 7 were also positively associated with depression. CONCLUSIONS Diabetes complications and high HbA1c levels had a substantial impact on depression in primary care patients with type 2 diabetes.