Introduction Diabetes mellitus (DM) is a chronic metabolic disorder frequently complicated by diabetic foot ulcers (DFUs), a leading cause of morbidity and limb amputation. Glycated hemoglobin (HbA1c) is the gold-standard biomarker for long-term glycemic control and is closely linked to DFU risk. This study aimed to compare HbA1c levels between DM patients with and without DFUs and to examined the association of selected sociodemographic characteristics with HbA1c levels in each group. Method: This retrospective case-control study analyzed hospital electronic medical records of 311 hospitalized patients with DM between January 2023 and December 2024, including 116 patients with DFUs and 195 without DFUs. HbA1c levels, age, sex, and marital status were extracted and analyzed using the Mann-Whitney U test. and Spearman’s rank correlation, with statistical significance set at p < 0.05. Results: Patients with DFU demonstrated significantly lower HbA1c levels (9.20 ± 2.83; p = 0.014) than patients without DFU (10.09 ± 3.02) (p < 0.001). Age was significantly associated with HbA1c levels in the control group (p = 0.001), whereas no significant association was observed in the case group. Marital status showed a significant association in the case group (p = 0.004), while sex was not significantly associated with HbA1c in either group. Conclusions: Hospitalized patients with DFU exhibited lower HbA1c levels than those without DFUs, suggesting that HbA1c measured during hospitalization may reflect the clinical context rather than pre-ulcer glycemic status. Therefore, HbA1c should be interpreted alongside clinical and sociodemographic factors, particularly age and marital status, when assessing patients with DFUs. Future prospective studies incorporating longitudinal HbA1c measurements and comprehensive clinical variables are recommended to clarify the relationship between glycemic control and DFU development