Vitamin D deficiency was associated with obesity (<i>p</i> = 0.0013), high HIV viral load (<i>p</i> = 0.043), low CD4 nadir (<200 cells/mm<sup>3</sup>, <i>p</i> = 0.006), prolonged ART exposure (<i>p</i> = 0.002), and the use of tenofovir disoproxil fumarate or protease inhibitor-containing regimens (<i>p</i> = 0.034 and <i>p</i> = 0.016, respectively).<h4>Conclusions</h4>These findings indicate that monitoring vitamin D levels could be particularly relevant for patients with HIV with higher-risk profiles. This evidence concerns the gene CD4 and obesity due to melanocortin 4 receptor deficiency.