AIMS: The objective of this study is to analyze how the impact of Diabetes Mellitus [DM] in patients with COVID-19 varies according to altitudinal gradient. METHODS: We obtained 1,280,806 records from adult patients with COVID-19 and DM to analyze the probability of COVID-19, development of COVID-19 pneumonia, hospitalization, intubation, admission to the Intensive Care Unit [ICU] and case-fatality rates [CFR]. Variables were controlled by age, sex and altitude of residence to calculate adjusted prevalence and prevalence ratios. RESULTS: Patients with DM had a 21.8% higher prevalence of COVID-19 and an additional 120.2% higher prevalence of COVID-19 pneumonia. The adjusted prevalence was also higher for these outcomes as well as for hospitalization, intubation and ICU admission. COVID-19 and pneumonia patients with DM had a 97.0% and 19.4% higher CFR, respectively. With increasing altitudes, the probability of being a confirmed COVID-19 case and the development of pneumonia decreased along CFR for patients with and without DM. However, COVID-19 patients with DM were more likely to require intubation when residing at high altitude. CONCLUSIONS: The study suggests that patients with DM have a higher probability of being a confirmed COVID-19 case and developing pneumonia. Higher altitude had a protective relationship against SARS-CoV-2 infection; however, it may be associated with more severe cases in patients with and without DM. High altitude decreases CFR for all COVID-19 patients. Our work also shows that women are less affected than men regardless of altitude.