The age >50 (HR = 1.12, 95% CI: 1.03–2.76, P=0.026), lymph node number (compared with non-lymph node, 1–5 for HR = 1.24, 95% CI: 0.95-3.21, P=0.054; 6–10 for HR = 1.16, 95% CI: 1.09–4.01, P=0.017; >10 for HR = 1.34, 95% CI: 1.19–2.34, P=0.000), advanced stage (HR = 1.71, 95% CI: 1.16–2.69, P=0.018), PVI present (HR = 4.07, 95% CI: 1.37–9.01, P=0.006), ER positive (HR = 0.25, 95% CI: 0.21–0.81, P=0.042) and PR positive (HR = 0.38, 95% CI: 0.24–0.75, P=0.012) were also correlated with the prognosis in breast cancers patients with T2DM. The gene discussed is ESR1; the disease is breast carcinoma.