Our study suggests that AIP may be a valuable biomarker for predicting depression risk in middle-aged and older Chinese adults with glucose metabolism disorders, as we observed a significant association between elevated AIP levels and depression risk in Pre-DM and DM participants. Here, AIP is linked to autoimmune pancreatitis.