The Homeostatic Model Assessment for Triglyceride Glucose Index (TyG) and its related indices, including triglyceride glucose-waist circumference (TyG-WC), triglyceride glucose-waist-to-height ratio (TyG-WHtR) and triglyceride glucose-body mass index (TyG-BMI), has emerged as a practical tool for assessing insulin resistance in metabolic disorders. However, limited studies have explored the connection between TyG, TyG-related indices and osteoporosis. This population-based study, utilizing data from the National Health and Nutrition Examination Survey 2011–2018, involved 5456 participants. Through weighted multivariate linear regression and smoothed curve fitting, a significant positive correlation was found between TyG, TyG-related indices and total bone mineral density (BMD) after adjusting for covariates [β = 0.0124, 95% CI (0.0006, 0.0242), P = 0.0390; β = 0.0004, 95% CI (0.0003, 0.0004), P < 0.0001; β = 0.0116, 95% CI (0.0076, 0.0156), P < 0.0001; β = 0.0001, 95% CI (0.0001, 0.0001), P < 0.0001]. In subgroup analysis, race stratification significantly affected the relationship between TyG and total BMD. Additionally, gender and race were both significant for TyG-related indices. Non-linear relationships and threshold effects with inflection points at 9.106, 193.9265, 4.065, and 667.5304 (TyG, TyG-BMI, TyG-WHtR, TyG-WC) were identified. Saturation phenomena were observed between TyG-BMI, TyG-WC and total BMD with saturation thresholds at 314.177 and 1022.0428. These findings contributed to understanding the association between TyG, TyG-related indices and total BMD, offering insights for osteoporosis prevention and treatment.