The number of severe cases of coronavirus disease 2019 (COVID-19) has been decreasing since the emergence of the Omicron variant at the end of 2021. COVID-19 has become a common infectious disease in Japan and was downgraded to a category five infectious disease on May 8, 2023. This study aimed to compare the impact of diabetes mellitus on in-hospital mortality in COVID-19 patients since COVID-19 became a common infectious disease. We conducted a retrospective observational study using data from an advanced critical care center in Osaka, Japan. The study included 1,381 patients of COVID-19 admitted to the center between March 1, 2020, and May 7, 2023, before COVID-19 became a category five infectious disease in Japan. Individuals younger than 18 years and pregnant women were excluded. We divided the patients into two groups: pre- and post-Omicron epidemic groups. The primary endpoint of the study was the in-hospital mortality, and the prognostic impact of diabetes mellitus was compared between the groups. The Kaplan-Meier curve showed a significantly lower rate of in-hospital mortality in the post-Omicron epidemic group than in the pre-Omicron epidemic group. The hazard ratio (HR) was 1.83 (95% CI, 1.36-2.50; p < 0.0001). Patients with diabetes mellitus had higher in-hospital mortality in both the pre- and post-Omicron epidemic groups; their HRs were 1.39 (95% CI, 1.21-1.59; p < 0.0001) and 1.45 (95% CI, 1.15-1.83; p = 0.0012), respectively. Diabetes mellitus had no significant interaction effect on the association between the post-Omicron epidemic and in-hospital mortality (p for interaction = 0.2154). Diabetes mellitus may continue contributing to COVID-19 in-hospital mortality in the future, as the Omicron sub-strain may still be prevalent.