Objective We determined the prevalence of poor glycemic control and associations with sociodemographics, comorbid conditions, and medication adherence among patients with type 2 diabetes mellitus (T2DM) at a tertiary hospital in southwestern Nigeria. Methods We conducted a retrospective observational study among 300 patients with T2DM using systematic random sampling. We used a semi-structured questionnaire to collect information on respondents’ sociodemographic profile, lifestyle, comorbid conditions, and antidiabetic medications. Adherence was determined using the Morisky Medication Adherence Scale. Fasting blood samples were tested using a glycated hemoglobin marker. Multivariate logistic regression was used to identify factors associated with poor glycemic control. Results Respondents’ mean age was 61.9 ± 11.8 years. The prevalence of poor glycemic control was 40.0% (95% confidence interval [CI]: 34.4%–45.8%). The adjusted odds ratio (95% CI) for factors associated with poor glycemic control was 2.522 (1.402–4.647) for older age, 1.882 (1.021–3.467) for low income, 1.734 (1.013–3.401) for obesity, 2.014 (1.269–5.336) for non-initiation of insulin therapy, and 1.830 (1.045–3.206) for poor medication adherence. Conclusion Older age, lower income, obesity, non-initiation of insulin, and poor medication adherence were associated with poor glycemic control. These variables may help clinicians identify patients at high risk of poor glycemic control.