Psychiatric disorders, such as schizophrenia (SCZ), major depressive disorder (MDD) and bipolar disorder (BPD), are highly comorbid with type 2 diabetes. However, the mechanisms underlying such comorbidity are understudied. This study explored the familial aggregation of common psychiatric disorders and type 2 diabetes by testing family history association, and investigated the shared genetic loading between them by testing the polygenic risk score (PRS) association. A total of 105,184 participants were recruited from the Taiwan Biobank, and genome-wide genotyping data were available for 95,238 participants. The Psychiatric Genomics Consortium-derived PRS for SCZ, MDD and BPD was calculated. Logistic regression was used to estimate the OR with CIs between a family history of SCZ/MDD/BPD and a family history of type 2 diabetes, and between the PRS and the risk of type 2 diabetes. A family history of type 2 diabetes was associated with a family history of SCZ (OR 1.23, 95% CI 1.08, 1.40), MDD (OR 1.19, 95% CI 1.13, 1.26) and BPD (OR 1.26, 95% CI 1.15, 1.39). Compared with paternal type 2 diabetes, maternal type 2 diabetes was associated with a higher risk of a family history of SCZ. SCZ PRS was negatively associated with type 2 diabetes in women (OR 0.92, 95% CI 0.88, 0.97), but not in men; the effect of SCZ PRS reduced after adjusting for BMI. MDD PRS was positively associated with type 2 diabetes (OR 1.04, 95% CI 1.00, 1.07); the effect of MDD PRS reduced after adjusting for BMI or smoking. BPD PRS was not associated with type 2 diabetes. The comorbidity of type 2 diabetes with psychiatric disorders may be explained by shared familial factors. The shared polygenic loading between MDD and type 2 diabetes implies not only pleiotropy but also a shared genetic aetiology for the mechanism behind the comorbidity. The negative correlation between polygenic loading for SCZ and type 2 diabetes implies the role of environmental factors.