Objective: To examine the association between triglyceride to high-density lipoprotein cholesterol (TG/HDL-C) ratio and the onset of diabetes mellitus (DM) within an ongoing prospective cohort in China. Subjects and methods: Participants were categorized into four groups according to their TG/HDL-C ratio quartiles. Kaplan-Meier estimator determined the cumulative incidence during follow-up and generated time-to-event curves. Additionally, a Cox proportional hazards regression analysis assessed the hazard ratios (HRs) and their corresponding 95% confidence intervals (CIs) for new-onset DM. A sensitivity analysis was also performed to mitigate the possible effects of reverse causation. Results: During a median follow-up duration of 13.67 years, 38,210 individuals developed DM. Kaplan-Meier curves revealed that the cumulative DM incidence across quartiles 1 to 4 was 40.95%, 42.04%, 41.42%, and 44.38%, respectively. The risk of developing DM increased over time according to the baseline TG/HDL-C ratio quartiles. After adjusting for potential confounding variables, the HRs reached 1.045 (95% CI, 1.015–1.076), 1.026 (95% CI, 0.996–1.058), and 1.095 (95% CI, 1.058–1.133) for quartiles 2, 3, and 4, respectively (P for trend < 0.001). These findings were consistent in sensitivity analyses, with HRs of 1.045 (95% CI, 1.016–1.075), 1.026 (95% CI, 0.996–1.058), and 1.095 (95% CI, 1.058–1.133) for quartiles 2, 3, and 4, respectively (P for trend < 0.0001). Conclusion: TG/HDL-C ratio is significantly and positively associated with new-onset DM.