Background and AimsPatients with some chronic liver diseases have increased risk of diabetes. Whether this is also the case for patients with autoimmune liver diseases is unknown. The study aimed to calculate risk and worldwide prevalence of diabetes in patients with autoimmune hepatitis (AIH), primary biliary cholangitis (PBC) and primary sclerosing cholangitis (PSC).MethodsWe performed a case–control study using data from the United Kingdom Biobank (UKB) and compared frequency of type 1 diabetes (T1D) and type 2 diabetes (T2D) in AIH and PBC with age‐, sex‐, BMI‐ and ethnicity‐matched controls. Next, we performed a systematic review and proportional meta‐analysis searching PubMed, Embase, Cochrane Library and Web of Science (inception to 1 May 2022 [AIH]; 20 August 2022 [PBC]; 11 November 2022 [PSC]). The pooled prevalence of diabetes was calculated using an inverse method random effects model.ResultsThree hundred twenty‐eight AIH patients and 345 PBC patients were identified in UKB and risk of T1D and T2D significantly increased compared with matched controls. Our systematic search identified 6914 records including the UKB study. Of these, 77 studies were eligible for inclusion comprising 36 467, 39 924 and 4877 individuals with AIH, PBC and PSC, respectively. The pooled prevalence of T1D was 3.8% (2.6%–5.7%), 1.7% (0.9%–3.1%), 3.1% (1.9%–4.8%) and of T2D 14.8% (11.1%–19.5%), 18.1% (14.6%–22.2%), 6.3% (2.8%–13.3%) in patients with AIH, PBC and PSC, respectively.ConclusionsPatients with autoimmune liver diseases have increased risk of diabetes. Increased awareness of diabetes risk in patients with autoimmune liver diseases is warranted.