Our study found that among PWH, prior STI diagnosis and low CD4 were associated with an increased risk of mpox diagnosis after adjusting for other covariates. This evidence concerns the gene CD4 and sexually transmitted disease.