BACKGROUND: Veterans with evidence of homelessness have high rates of mental health and substance abuse disorders, but chronic medical conditions such as diabetes are also prevalent. OBJECTIVE: We aimed to determine the impact of homelessness on glycemic control in patients with type 2 diabetes mellitus. DESIGN: Longitudinal analysis of a retrospective cohort. SUBJECTS: A national cohort of 1,263,906 Veterans with type 2 diabetes. Subjects with evidence of homelessness were identified using a combination of diagnostic and administrative codes. MAIN MEASURES: Odds for poor glycemic control using hemoglobin A1C (HbA1C) cutoff values of 8 % and 9 %. Homeless defined as a score based on the number of indicator variables for homelessness within a veterans chart. KEY RESULTS: Veterans with evidence of homelessness had a significantly greater annual mean HbA1C ≥ 8 (32.6 % vs. 20.43 %) and HbA1C ≥ 9 (21.4 % vs. 9.9 %), tended to be younger (58 vs. 67 years), were more likely to be non-Hispanic black (39.1 %), divorced (43 %) or never married (34 %), to be urban dwelling (88.8 %), and to have comorbid substance abuse (46.7 %), depression (42.3 %), psychoses (39.7 %), liver disease (18.8 %), and fluid/ electrolyte disorders (20.4 %), relative to non-homeless veterans (all p < 0.0001). Homelessness was modeled as an ordinal variable that scored the number of times a homelessness indicator was found in the Veterans medical record. We observed a significant interaction between homelessness and race/ethnicity on the odds of poor glycemic control. Homelessness, across all racial-ethnic groups, was associated with increased odds of uncontrolled diabetes at a cut-point of 8 % and 9 % for hemoglobin A1C ; however, the magnitude of the association was greater in non-Hispanic whites [8 %, OR 1.55 (1.47;1.63 CONCLUSIONS: Homelessness is a significant risk factor for uncontrolled diabetes in Veterans, especially among non-Hispanic white and Hispanic patients. While efforts to engage homeless patients in primary care services have had some success in recent years, these data suggest that broader efforts targeting management of diabetes and other chronic medical conditions remain warranted.