BackgroundA lthough the triglyceride-glucose (TyG) index has been shown to closely correlate with cardiometabolic outcomes and predict cardiovascular events in many groups, it remains unclear whether obese status in young and middle-aged adults is associated with long-term unfavorable cardiovascular events. This warrants further investigation.MethodsThis retrospective cohort study analyzed data from the National Health and Nutrition Examination Survey spanning the years 1999–2018, with follow-up for mortality status until December 31, 2019. To categorize participants based on the TyG level, the optimal critical value was determined through restricted cubic spline function analysis, dividing them into high and low TyG groups. The study assessed the relationship between TyG and cardiovascular events and all-cause mortality in young and middle-aged adults stratified by obesity status. Kaplan‒Meier and Cox proportional risk models were used to analyze the data.ResultsDuring a follow-up period of 123 months, a high TyG index increased the risk of cardiovascular events by 63% (P= 0.040) and the risk of all-cause mortality by 32% (P= 0.010) in individuals after adjusting for all covariates. High TyG was shown to be linked to cardiovascular events in obese people (Model 3: HR = 2.42, 95% CI = 1.13–5.12,P= 0.020); however, there was no significant difference in TyG groups for nonobese adults in Model 3 (P= 0.08).ConclusionsTyG was independently associated with harmful long-term cardiovascular events in young and middle-aged US populations, with a stronger association observed in those who were obese.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12944-023-01834-y.