To analyse spatial and temporal changes in the global burden of diabetes mellitus (DM) attributable to dietary factors from 1990 to 2019. The burden of DM was analysed in terms of age-standardized disability-adjusted life-year (DALY) rates and age-standardized death rates (ASDRs), which were obtained from the Global Burden of Disease Study 2019, and their corresponding estimated annual percentage changes (EAPCs). The ASDR exhibited a decreasing trend (EAPC = -0.02), while the age-standardized DALY rate exhibited an increasing trend (EAPC = 0.65). Forty-four percent of the burden of DM was attributable to dietary factors, with the three largest contributors being high intake of red meat, high intake of processed meat, and low intake of fruit. Residence in a region with a high sociodemographic index (SDI) was associated with a diet low in whole grains and high in red meat and processed meat, while residence in a low-SDI region was associated with a diet low in whole grains and fruits, and high in red meat. The age-standardized DALYs of DM attributable to dietary factors increased between 1990 and 2019 but differed among areas. The three largest dietary contributors to the burden of DM were high intake of red meat, high intake of processed meat, and low intake of fruit.