Abstract Purpose This study aimed to evaluate the relationship between control for multiple risk factors and diabetes-related heart failure and all-cause mortality, and to explore the extent to which the excess risk can be reduced. Methods Diabetes participants with pre-existing heart failure documented in discharge register or medical insurance records and incomplete baseline risk factor information were excluded. Each of these patients was then matched randomly to four control subjects. The degree of risk factor control was defined by attainment of target values for blood pressure, body mass index , low-density lipoprotein cholesterol, fasting blood glucose, high-sensitive C-reactive protein and smoking. The primary outcome was newly diagnosed heart failure, and the secondary outcome was all-cause mortality.Fine-Gray and Cox regression were performed to estimate the risk of heart failure and all-cause mortality among diabetes patients in relation to the degree of control for multiple risk factors respectively, and the group with ≤1 risk factor control was set as the reference group. All-cause mortality was used as a competing risk in the Fine-Gray model. Results A total of 17,676 patients with diabetes and 69,493 matched non-diabetic control subjects were included. Of these, 84.2% were men and the mean age was 56.2±10.7 years. Over a median follow-up of 11.2 (13.1-15.0) years, a total of 1,070 cases of heart failure and 4,121 cases of all-cause mortality were identified among patients with diabetes. Significant inverse associations were observed between the number of well-controlled risk factors and the risk of incident adverse outcomes in diabetes patients. For each additional risk factor that was controlled, there was an associated 16% decrease in the risk of heart failure and a 10% decrease in the risk of all-cause mortality. The incidence rate of heart failure among diabetes patients was at its lowest for those with ≥5 risk factors (HR: 0.46, 95% CI: 0.34-0.62), and it constantly increased with a lower number of well-controlled risk factors. As for all-cause mortality, the lowest risk was associated with optimal risk factor control (HR: 0.59, 95% CI: 0.50-0.68). Among diabetes patients with ≥5 risk factors that were well controlled, the adjusted hazard ratio for heart failure and all-cause mortality was 1.25 (95%CI: 0.99-1.56) and 1.17(95%CI: 1.05-1.31) respectively, as compared with controls. The protective impact of comprehensive risk factor control on the risk of heart failure was more pronounced among men than women, as well as among those using antihypertensive medications than non-users. Conclusions Control for multiple risk factors is related to a lower risk of heart failure and all-cause mortality in an accumulative and sex-specific manner. Compared to the general population, patients with diabetes mellitus remains associated with an increased risk for the outcomes in spite of the optimization of risk factor control.