Homelessness and housing instability disproportionately affect U.S. veterans with psychiatric disorders, human immunodeficiency virus/acquired immunodeficiency syndrome (HIV/AIDS), hepatitis C, and Alzheimer's disease and related disorders (ADRD). We examined housing status and/or HIV/AIDS in relation to ADRD risk and evaluated hepatitis C, substance use, and mental health disorders as mediators and/or moderators of hypothesized relationships, among U.S. veterans ≥50 years of age seeking Department of Veterans Affairs (VA) healthcare services. A retrospective cohort study was conducted using linked VA Homeless Operations Management and Evaluation System and Corporate Data Warehouse databases (2017-2023) on 3 275 098 eligible veterans yielding 133 388 ADRD cases over 5 years of follow-up. Multivariable regression and causal mediation analyses were performed, controlling for demographic and clinical characteristics. Taking stably housed veterans without HIV/AIDS as referent, ADRD risk was higher among veterans with homelessness/housing instability alone (adjusted hazard ratio [aHR] = 1.67, 95% confidence interval [CI]: 1.63,1.72), lower among veterans with HIV/AIDS alone (aHR = 0.65, 95% CI: 0.58,0.73), but similar to veterans with homelessness/housing instability and HIV/AIDS (aHR = 1.01, 95% CI: 0.79,1.29). In adjusted models, hepatitis C and psychiatric disorders were positively related to homelessness/housing instability and ADRD risk, but negatively related to HIV/AIDS. Statistically significant mediation and/or moderation of hepatitis C and psychiatric disorders were observed, although <10% of total effects were explained by these characteristics, controlling for confounders. Among older veterans, ADRD diagnoses over 5 years were less among those with HIV/AIDS, but more among those with homelessness/housing instability, and these relationships were partly explained by hepatitis C and psychiatric disorders.