Comorbidities such as schizophrenia and medication such as antipsychotics may influence the risk of dementia among people living with HIV (PLWH). The objective of this paper is to assess the associations among HIV patients with schizophrenia, off-label antipsychotics, and dementia risk. US Department of Veterans Affairs healthcare facilities from 2000 to September 2023. Retrospective cohort study of PLWH treated by the U.S. Department of Veterans Affairs with prior history of schizophrenia, off-label antipsychotic use and neither schizophrenia nor antipsychotic use. Propensity score matched non-HIV controls were included for the respective HIV groups. The hazard of dementia is estimated using Cox proportional hazards models. PLWH and schizophrenia, were found to have a 2.49 higher hazard of dementia compared to HIV patients with no history of schizophrenia or antipsychotic medication use (HR=2.49, 95%CI=(1.85-3.35)). PLWH and off-label antipsychotic use were found to have a 1.77-fold higher hazard of dementia compared to HIV patients with no history of schizophrenia or antipsychotic medication use (HR=1.77, 95% CI=(1.37-2.28)). Propensity score matched analysis reveals that, among schizophrenia patientis, those with HIV had a 1.65-fold higher hazard of dementia (HR=1.65, 95%CI=(1.12-2.44)). Among patients with no schizophrenia or antipsychotic medication, those with HIV had a 1.47 fold higher hazard of dementia (HR=1.47, 95%CI=(1.33-1.63)). This study demonstrates that among PLWH, history of schizophrenia or off-label antipsychotic medication use are associated with substantial increases in dementia incidence. Furthermore, propensity-matched control analysis reveals that HIV infection itself is independently and significantly associated with elevated dementia risk.