The objectives of this study were to estimate the prevalence of diabetes mellitus in people with HIV/AIDS and to assess the associated risk factors. A cross-sectional study with 168 patients treated at an infectious disease outpatient. Were investigated sociodemographic, epidemiological and clinical variables through interview using forms. Casual plasma glucose, blood pressure and anthropometric data were recorded. For the analysis, we used descriptive statistics and logistic regression. The results showed that most patients were male, single, with 9-12 years of schooling, in the category of sexual exposure and heterosexual. The prevalence of diabetes mellitus was 7.14%, and risk factors were smoking, alcohol use, inadequate diet, increased abdominal circumference, overweight, age over 45 years, family history of diabetes and personal history of hypertension. Women were 5.29 times more likely to have increased abdominal circumference (P < 0.001). Men (P = 0.003), married (P = 0.035), with monthly income greater than two times the minimum wage (P = 0.035) were more likely to be hypertensive. Diabetes occurred in older patients (P = 0.008). In conclusion, the prevalence of people with HIV/AIDS and diabetes mellitus was 7.14%, and most had modifiable risk factors for diabetes, including smoking, alcohol use, inadequate diet and overweight, needing health education interventions for diabetes prevention.