Abstract Background High triglyceride-glucose index (TyG) is a major risk factor for heart failure, but the long-term effect of high TyG index on the risk of developing heart failure remains unclear. Therefore, we aimed to determine the relationship between the cumulative exposure to TyG index and the risk of heart failure. Methods A total of 56,149 participants from the Kailuan Study, who participated in three consecutive health examinations in 2006, 2008, and 2010 and had no history of heart failure or cancer were recruited for this study. The cumulative TyG index was calculated as the weighted sum (value × time) of the mean TyG index for each time interval. The participants were placed into quartiles based on their cumulative TyG index. The study ended on December 31, 2020, and the primary outcome was new-onset heart failure during the follow-up period. In addition, a Cox proportional hazards regression model and a restricted cubic spline analysis were used to further evaluate the relationship between cumulative TyG index and the risk of heart failure. Results During a median follow-up period of 10.04 years, a total of 1,312 new heart failure events occurred. After adjustment for potential confounding factors, the Cox regression analysis showed that the hazard ratios (95% confidence intervals) for the risk of heart failure in the Q2, Q3, and Q4 groups were 1.02 (0.83,1.25), 1.29 (1.07,1.56) and 1.40 (1.15,1.71), respectively, vs. the Q1 group. The subgroup analysis showed a significant interaction between cumulative TyG index and BMI or waist circumference, but there was no interaction between age, sex and cumulative TyG index. The restricted cubic spline analysis showed a dose-response relationship between cumulative TyG index and the risk of heart failure. In addition, the sensitivity analysis generated results that were consistent with the primary results. Conclusions High cumulative TyG index is associated with a higher risk of heart failure. Thus, the TyG index may be useful for the identification of individuals at high risk of heart failure. The present findings emphasize the importance of the long-term monitoring of the TyG index in clinical practice.