ObjectiveThe triglyceride–glucose (TyG) index has been shown to be a new alternative measure for insulin resistance. However, no study has attempted to investigate the association of the TyG index with incident atrial fibrillation (AF) in the general population without known cardiovascular diseases.MethodsIndividuals without known cardiovascular diseases (heart failure, coronary heart disease, or stroke) from the Atherosclerosis Risk in Communities (ARIC) cohort were recruited. The baseline TyG index was calculated as the Ln [fasting triglycerides (mg/dL) × fasting glucose (mg/dL)/2]. The association between the baseline TyG index and incident AF was examined using Cox regression.ResultsOf 11,851 participants, the mean age was 54.0 years; 6586 (55.6%) were female. During a median follow-up of 24.26 years, 1925 incidents of AF cases (0.78/per 100 person-years) occurred. An increased AF incidence with a graded TyG index was found by Kaplan‒Meier curves (P< 0.001). In multivariable-adjusted analysis, both < 8.80 (adjusted hazard ratio [aHR] = 1.15, 95% confidence interval [CI] 1.02, 1.29) and > 9.20 levels (aHR 1.18, 95% CI 1.03, 1.37) of the TyG index were associated with an increased risk of AF compared with the middle TyG index category (8.80–9.20). The exposure-effect analysis confirmed the U-shaped association between the TyG index and AF incidence (P= 0.041). Further sex-specific analysis showed that a U-shaped association between the TyG index and incident AF still existed in females but not in males.ConclusionsA U-shaped association between the TyG index and AF incidence is observed in Americans without known cardiovascular diseases. Female sex may be a modifier in the association between the TyG index and AF incidence.Graphical AbstractSupplementary InformationThe online version contains supplementary material available at 10.1186/s12933-023-01777-9.