Objectives The clinical course of coronavirus disease 2019 (COVID-19) infection is often aggressive, with unfavorable outcomes for those with comorbidities such as type 2 diabetes mellitus (T2DM). We aimed to assess the prevalence and risk factors of COVID-19 infection, mortality, and post-infection lung fibrosis in patients with COVID-19 infection who had T2DM. Methods In this cross-sectional study, we included adult patients with T2DM who attended an endocrinology clinic and underwent testing for COVID-19 infection. Results Among 1039 included patients, the mean age was 59.5 ± 11.0 years and 429 (41.3%) were men. Overall, 87.1% of patients had received COVID-19 vaccination and 32.3% had confirmed COVID-19 infection. The COVID-19-related mortality was 3.0% and rate of post-COVID-19 lung fibrosis was 19.1%. Vaccination was associated with lower COVID-19-related mortality (odds ratio [OR]: 0.03, 95% confidence interval [CI]: 0.0–0.3) and post-COVID-19 lung fibrosis risk (OR: 0.3, 95% CI: 0.1–0.9). Conclusion Patients with T2DM exhibited a high prevalence of COVID-19 infection and associated mortality. However, COVID-19 vaccines were beneficial in reducing the risks of COVID-19-related mortality and post-infection lung fibrosis in these patients. COVID-19 vaccines and boosters are recommended for patients with T2DM. Further studies involving larger study populations are necessary to validate these findings.