Higher baseline AIP levels are significantly associated with an increased risk of depression in middle-aged and older adults, with distinct effects modulated by glucose metabolism status. Here, AIP is linked to depressive disorder.