This study identified a significant association between elevated AIP levels and an increased risk of depression in middle-aged and older adults, particularly those with Pre-DM and DM. Here, AIP is linked to depressive symptom measurement.