ImportanceNon-Hispanic Black (hereafter, Black) individuals experience worse prostate cancer outcomes due to socioeconomic and racial inequities of access to care. Few studies have empirically evaluated these disparities across different health care systems.ObjectiveTo describe the racial and ethnic and neighborhood socioeconomic status (nSES) disparities among residents of the same communities who receive prostate cancer care in the US Department of Veterans Affairs (VA) health care system vs other settings.Design, Setting, and ParticipantsThis cohort study obtained data from the VA Central Cancer Registry for veterans with prostate cancer who received care within the VA Greater Los Angeles Healthcare System (VA cohort) and from the California Cancer Registry (CCR) for nonveterans who received care outside the VA setting (CCR cohort). The cohorts consisted of all males with incident prostate cancer who were living within the same US Census tracts. These individuals received care between 2000 and 2018 and were followed up until death from any cause or censoring on December 31, 2018. Data analyses were conducted between September 2022 and December 2023.ExposuresHealth care setting, self-identified race and ethnicity (SIRE), and nSES.Main Outcomes and MeasuresThe primary outcome was all-cause mortality (ACM). Cox proportional hazards regression models were used to estimate hazard ratios for associations of SIRE and nSES with prostate cancer outcomes in the VA and CCR cohorts.ResultsIncluded in the analysis were 49 461 males with prostate cancer. Of these, 1881 males were in the VA cohort (mean [SD] age, 65.3 [7.7] years; 833 Black individuals [44.3%], 694 non-Hispanic White [hereafter, White] individuals [36.9%], and 354 individuals [18.8%] of other or unknown race). A total of 47 580 individuals were in the CCR cohort (mean [SD] age, 67.0 [9.6] years; 8183 Black individuals [17.2%], 26 206 White individuals [55.1%], and 13 191 individuals [27.8%] of other or unknown race). In the VA cohort, there were no racial disparities observed for metastasis, ACM, or prostate cancer–specific mortality (PCSM). However, in the CCR cohort, the racial disparities were observed for metastasis (adjusted odds ratio [AOR], 1.36; 95% CI, 1.22-1.52), ACM (adjusted hazard ratio [AHR], 1.13; 95% CI, 1.04-1.24), and PCSM (AHR, 1.15; 95% CI, 1.05-1.25). Heterogeneity was observed for the racial disparity in ACM in the VA vs CCR cohorts (AHR, 0.90 [95% CI, 0.76-1.06] vs 1.13 [95% CI, 1.04-1.24]; P = .01). No evidence of nSES disparities was observed for any prostate cancer outcomes in the VA cohort. However, in the CCR cohort, heterogeneity was observed for nSES disparities with ACM (AHR, 0.82; 95% CI, 0.80-0.84; P = .002) and PCSM (AHR, 0.86; 95% CI, 0.82-0.89; P = .007).Conclusions and RelevanceResults of this study suggest that racial and nSES disparities were wider among patients seeking care outside of the VA health care system. Health systems–related interventions that address access barriers may mitigate racial and socioeconomic disparities in prostate cancer.