The purpose of this study was to determine the risk of surgical mortality and morbidity in patients with diabetes mellitus (DM) undergoing a gastrectomy for gastric cancer (GC). Using the Taiwan National Health Insurance Research Database, we identified 6284 patients who underwent gastrectomy for GC from 1999 to 2010. In addition, we created a non-DM control cohort consisting of 6268 patients who received gastrectomy during the same period. Compared with the non-DM cohort, the DM cohort exhibited a higher prevalence of preoperative coexisting medical conditions, namely hypertension, hyperlipidemia, coronary artery disease, chronic kidney disease, chronic pulmonary disease, stroke, and cirrhosis. The odds ratio (OR) of 30-day postoperative mortality after gastrectomy in the DM cohort was 1.04 (95% confidence interval 0.78-1.40) after we adjusted for covariates. The DM cohort did not exhibit a significantly higher risk of 30-day postoperative morbidities. Further analysis revealed that only patients with a history of a DM-related coma exhibited a higher risk of 30-day postoperative mortality (adjusted OR 2.46, 95% confidence interval 1.10 - 5.54). Moreover, the risk of 90-day postoperative mortality was significantly higher in patients with DM-related eye involvement, coma, peripheral circulatory disease, and renal manifestations, in comparison with the non-DM cohort. The risk of 90-day mortality after gastrectomy for GC is higher in patients with DM-related manifestations than those without DM.