BACKGROUND: Type 2 diabetes (T2D) is a chronic metabolic disorder that has high comorbidity with mental disorders. The genetic relationships between T2D and depression are far from being well understood. METHODS: We performed genetic correlation, polygenic overlap, Mendelian randomization (MR) analyses, cross-trait meta-analysis, and Bayesian colocalization analysis to assess genetic relationships between T2D and depression, in the forms of major depressive disorder (MDD) and depressed affect (DAF). Then, the summary data-based MR (SMR) analysis was performed to prioritize genes contributing to MDD and to T2D from functional perspective. MDD-driven signaling pathways were constructed to understand the influence of MDD on T2D at the molecular level. RESULTS: T2D has positive genetic correlations both with MDD (r CONCLUSIONS: Our study points out that depression, in the forms of MDD and DAF, may increase the risk of T2D. Analysis of underlying genetic variation and the molecular pathways, connecting depression and T2D, indicate that the pathophysiological foundations of these two conditions have a notable overlap.