The purpose of this study was to exam the impact of type 2 diabetes mellitus (T2DM) on CD4 cell count trends in adults with HIV. In a longitudinal retrospective study in an urban primary care HIV clinic in the southeastern United States from 2010 to 2012, patients with HIV medical charts were audited to obtain their CD4 cell count, diabetes status, weight, and demographic information. Rates of increase of CD4 T cell count (i.e. slopes) were obtained using a linear mixed-effects model. Most of the HIV–T2DM cohort (n = 262) and HIV-only cohort (n = 2399) were African American (76%) and male (77%). The CD4 T cell counts were consistently higher in the HIV–T2DM cohort (p < .0001). The mean rate of CD4 T cell count increase (mean ± SE) was 63 ± 9 cells/µl/year in HIV–T2DM African American women and 28 ± 7 cells/µl/year in HIV–T2DM African American men (p = 0.003). In the multivariable slope analysis, the CD4 T cell count increase was significantly faster for HIV–T2DM African American women than for all other patients (mean difference = 30/cells/µl/year, 95% CI: 13–47; p < 0.001). Gender, race/ethnicity, and the diagnosis of diabetes influenced the recovery of CD4 cell counts.