Objective This study aimed to explore the causal association between autoimmune liver disease(AILD)and diabetes mellitus(DM)by two-sample bidirectional Mendelian randomization(MR)analysis.Methods GWAS data for AILD and type 1 diabetes mellitus(T1DM)were downloaded from the IEU database,and GWAS data for type 2 diabetes mellitus(T2DM)were downloaded from the DIAGRAM consortium,and eligible single nucleotide polymorphisms(SNP)were extracted.MR analyses were performed using MR-Egger regression,weighted median(WME),and inverse variance weighting(IVW)methods.In addition,the robustness of the results was verified by heterogeneity test,multiple validity analysis,leave-one-out analysis and MR-PRESSO analysis.Results IVW results showed that primary biliary cholangitis(PBC)had a positive causal effect on T1DM(OR=1.244,95%CI:1.137-1.361,P<0.001).Reverse MR analysis showed that T1DM significantly increased the morbidity risk of autoimmune hepatitis(AIH)(OR=1.111,95%CI:1.053-1.173,P<0.001),PBC(OR=1.218,95%CI:1.133-1.310,P<0.001),and primary sclerosing cholangitis(PSC)(OR=1.375,95%CI:1.187-1.592,P<0.001).No significant causal association between AILD and T2DM was observed.Heterogeneity tests suggested heterogeneity among SNPs,consequently,the random effects IVW model was used for MR analysis.Multivariate analysis did not suggest horizontal pleiotropy.Leave-one-out analysis showed that causality remained consistent after removing each SNP.Outliers were detected by MR-PRESSO analysis,and the results did not change much when the outliers were removed and the MR analysis was repeated,further confirming the reliability of the results.Conclusion Bidirectional causality was observed between PBC and T1DM.Patients with T1DM were at increased risk of AIH and PSC,and no significant causality was observed between AILD and T2DM.