Despite significant advances in HIV care and treatment, Black and Latino people living with HIV (PWH) still face substantial health disparities due to discrimination and systemic inequities, which adversely affect their mental health. Given the profound significance of religion and spirituality in Black and Latino communities, the effects of religiosity on the relationship between discrimination and mental health should be examined. This study examined religiosity as a moderator between discrimination and mental health among Black and Latino PWH. Using data from the All of Us Research Program collected from 2016 to 2022, we analyzed electronic health records and survey responses from 902 participants, employing descriptive statistics, Chi-squared test, principal component analysis, and binary logistic regression. Results showed significant associations between education, employment, income, discrimination, religiosity, and mental health. Compared with no or low religiosity, those with high religiosity had significant higher odds of good mental health (aOR:2.35, 95% CI:1.16-4.75). Those who experienced discrimination had 59% lower odds of good mental health compared to those who did not report experiences of discrimination (aOR:0.41, 95% CI:0.20-0.83). There was no significant interaction effect of religiosity on the relationship between discrimination and mental health. While religiosity positively influences mental health, it does not mitigate the detrimental effects of compounded discrimination that Black and Latino PWH face. Continued collaborations between religious and spiritual leaders, researchers, and community members is needed to understand better the relationship between these factors and to identify strategies to maximize the protective effect of religiosity. Este estudio examin & oacute; la religiosidad como moderador entre la discriminaci & oacute;n y la salud mental entre las personas negras y latinas con VIH (PCH). Utilizando datos del Programa All of Us recopilados entre 2016 y 2022, analizamos los registros electr & oacute;nicos de salud y las respuestas a encuestas de 902 participantes, empleando estad & iacute;stica descriptiva, prueba de Chi-cuadrado, an & aacute;lisis de componentes principales y regresi & oacute;n log & iacute;stica binaria. Los resultados mostraron asociaciones significativas entre la educaci & oacute;n, los ingresos, la discriminaci & oacute;n, la religiosidad y la salud mental. En comparaci & oacute;n con la religiosidad nula o baja, aquellos con religiosidad alta ten & iacute;an probabilidades significativamente m & aacute;s altas de buena salud mental (aOR: 2.35, IC 95%: 1.16- 4.75). Aquellos que experimentaron discriminaci & oacute;n ten & iacute;an un 59% menos de probabilidades de buena salud mental en comparaci & oacute;n con aquellos que no informaron experiencias de discriminaci & oacute;n (aOR: 0.41, IC 95%: 0.20-0.3). No hubo un efecto significativo de la interacci & oacute;n de la religiosidad en la relaci & oacute;n entre la discriminaci & oacute;n y la salud mental. Si bien la religiosidad influye positivamente en la salud mental, no mitiga los efectos perjudiciales de la discriminaci & oacute;n agravada que enfrentan las personas negras y latinas.