BackgroundAn association has been indicated between atopic dermatitis (AD), a prevalent chronic inflammatory skin disease, and diabetes mellitus. However, the exact causal relationship between AD and both type 1 diabetes (T1D) and type 2 diabetes (T2D) remains controversial. This study aimed to explore the causal association between AD and diabetes by Mendelian Randomization (MR) approaches.MethodsPublic genetic summary data for AD was obtained from EAGLE study. Single nucleotide polymorphisms of diabetes were retrieved from four genome-wide association studies that had been performed in European populations. Inverse variance weighted (IVW) in MR analysis was used as the primary means of causality estimation. Several complementary analyses and sensitivity analyses were performed to calculate MR estimates and to enhance the causal inference, respectively. The R package ‘TwoSampleMR’ was used for analysis.ResultsGenetically predicted AD led to a higher risk of T1D (OR, 1.19; 95% CI, 1.05, 1.34;P= 0.006) and T2D (OR, 1.07; 95% CI, 1.02, 1.11;P= 0.003) based on random-effect IVW method. The complementary analyses provided similar positive results. Cochran’s Q test and I2statistics indicated moderate heterogeneity between AD and both T1D and T2D. No significant horizontal pleiotropy was detected by MR-Egger Intercept p except summary data from FinnGen consortium.ConclusionGenetically predicted AD is a risk factor for both T1D and T2D. These findings imply potential shared pathological mechanisms between AD and diabetes, thus suggesting the significance of early clinical diagnosis and prevention of AD in reducing the incidence of diabetes.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12920-023-01575-y.