Patients with diabetes have a higher risk of severe infection and mortality due to COVID-19. Considering the current limited effective pharmacological treatments, vaccination remains one of the most effective means to control the pandemic. The current study aimed to determine the prevalence of COVID-19 infection and the rate of COVID-19 vaccination coverage among patients with type 2 diabetes mellitus. The patients were identified from a diabetes hospital registry at Prince Sultan Military Medical City, Riyadh, Saudi Arabia in July 2021. The history of COVID-19 infection and the vaccination status were retrieved from the National Health Electronic Surveillance Network (HESN) program and the Seha platform, respectively. A total of 11,573 patients were included in this study (representing 99.5% of all patients in the registry). A total of 1981 patients (17.1%) had a history of confirmed COVID-19 infection. The rate of vaccination with a 1st dose was 84.8% (n = 9811), while the rate of full vaccination with the 2nd dose was 55.5% (n = 6422). The analysis showed that a higher proportion of male patients were fully vaccinated than female patients (61.0% versus 51.2%, p < 0.001). There were statistically significant differences among the age groups, with the full vaccination rate ranging from 59.0% for the 61–70-year-old age group to 49.0% for the > 80-year-old age group (p < 0.001). The patients with no previous history of COVID-19 infection were more likely to get fully vaccinated than those with a previous history of the infection (63.9% versus 14.6%, respectively, p < 0.001). The factors associated with a higher likelihood of unvaccinated status included the female gender (adjusted odds ratio (aOR) = 1.705 (95% confidence interval (CI): 1.528–1.902)), elderly patients in the age group of 61–70 (aOR (95% CI) = 1.390 (1.102–1.753)), the age group of 71–80 (aOR (95% CI) = 1.924 (1.499–2.470)) and the age group of >80 (aOR (95% CI) = 3.081 (2.252–4.214), and prior history of COVID-19 infection (aOR (95% CI) = 2.501 (2.223–2.813)). In conclusion, a considerable proportion of patients with type 2 diabetes had confirmed COVID-19 infection. Continued targeted efforts are needed to accelerate vaccination coverage rates among patients with diabetes in general and the particular subgroups identified in this study.