Observational studies have reported high comorbidity between type 2 diabetes (T2D) and severe COVID‐19. However, the causality between T2D and COVID‐19 has yet to be validated. We performed genetic correlation and Mendelian randomization (MR) analyses to assess genetic relationships and potential causal associations between T2D and three COVID‐19 outcomes (severe acute respiratory syndrome coronavirus 2 [SARS‐CoV‐2] infection, COVID‐19 hospitalization, and critical COVID‐19). Molecular pathways connecting SARS‐CoV‐2 and COVID‐19 were reconstructed to extract insights into the potential mechanisms underlying the connection. We identified a high genetic overlap between T2D and each COVID‐19 outcome (genetic correlations 0.21–0.28). The MR analyses indicated that genetic liability to T2D confers a causal effect on hospitalized COVID‐19 (odds ratio 1.08, 95% confidence interval [CI] 1.04–1.12) and critical COVID‐19 (1.09, 1.03–1.16), while genetic liability to SARS‐CoV‐2 infection exerts a causal effect on T2D (1.25, 1.00–1.56). There was suggestive evidence that T2D was associated with an increased risk for SARS‐CoV‐2 infection (1.02, 1.00–1.03), while critical COVID‐19 (1.06, 1.00–1.13) and hospitalized COVID‐19 (1.09, 0.99–1.19) were associated with an increased risk for T2D. Pathway analysis identified a panel of immunity‐related genes that may mediate the links between T2D and COVID‐19 at the molecular level. Our study provides robust support for the bidirectional causal associations between T2D and COVID‐19. T2D may contribute to amplifying the severity of COVID‐19, while the liability to COVID‐19 may increase the risk for T2D.