HIV stigma is associated with suboptimal clinical outcomes and has been cross-sectionally linked to cognitive deficits in people with HIV (PWH). However, it is unclear whether HIV stigma precedes cognitive decline or vice versa. We examined associations in 303 adult PWH (mean age 50.01 (11.91) years; 46% female; 67% non-Hispanic Black) between the abbreviated Berger Stigma Scale score and longitudinal change across the NIH Toolbox Cognition Battery measures. 89% of participants reported experiencing HIV stigma. In unadjusted analyses, greater HIV stigma was associated with worse attention performance at yearly follow-up visits (B = -0.07, 95% CI = -0.13 - -0.01, p = 0.025). When adjusting for clinicodemographic variables, HIV stigma was associated with worse processing speed and global cognition at yearly follow-up visits. This finding suggests that HIV stigma precedes subsequent cognitive decline and highlights the importance of reducing stigma to improve cognitive functioning among PWH.