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. This evidence concerns the gene AIP and major depressive disorder.