AimAutoimmune pancreatitis (AIP) is a rare and enigmatic immune‐mediated inflammatory diseases associated with inflammatory bowel disease (IBD). We aimed to describe the prevalence, characteristics, and associated factors of AIP‐IBD patients in China.MethodsWe performed a retrospective bidirectional case–control study from 1998 to 2021. The diagnosis of IBD was based on the European Crohn's and Colitis Organisation guidelines and of AIP was based on the International Consensus Diagnostic Criteria. IBD controls were matched by age (±1), sex, and IBD type at a ratio of 1:4, while AIP controls were matched by the frequency of AIP types.ResultsThe age‐standardized prevalence of AIP‐IBD patients in the IBD and AIP population were 292.04 and 8151.93 per 100 000, respectively. IBD patients had a higher risk of suffering AIP compared to non‐IBD patients (OR: 8.4, CI: 4.7–14.9, p < 0.0001), as well as AIP patients developing IBD compared to general population in China. The mean age at diagnosis of IBD was 34.8, and of AIP was 50. Seven cases were first diagnosed with IBD, and the average IBD duration was 94.8 months, while 26.1 months for AIP. Independent factors associated with AIP was tuberculosis infection (p < 0.0001). The occult blood test (p = 0.008) was independently associated with IBD.ConclusionsWe found most AIP‐IBD patients had UC or type 2 AIP. The IBD population is more likely to develop AIP compared to the general population, vice versa. Tuberculosis infection were associated with AIP, and occult blood test was associated with IBD.This article is protected by copyright. All rights reserved.