The relationship between the total cholesterol/high-density lipoprotein cholesterol (TC/HDL-C) ratio and all-cause and cardiovascular mortality has not been elucidated. Herein, we intend to probe the effect of the TC/HDL-C ratio on all-cause and cardiovascular mortality in the general population. From the 1999-2014 National Health and Nutrition Examination Surveys (NHANES), a total of 32,405 health participants aged ≥18 years were included. The TC/HDL-C levels were divided into five groups: Q1: <2.86, Q2: 2.86-3.46, Q3: 3.46-4.12, Q4: 4.12-5.07, Q5: >5.07. Multivariate Cox regression models were used to explore the relationship between the TC/HDL-C ratio and cardiovascular and all-cause mortality. Two-piecewise linear regression models and restricted cubic spline regression were used to explore nonlinear and irregularly shaped relationships. Kaplan-Meier survival curve and subgroup analyses were conducted. The population comprised 15,675 men and 16,730 women with a mean age of 43 years. During a median follow-up of 98 months (8.1 years), 2,859 mortality cases were recorded. The TC/HDL-C ratio and all-cause mortality showed a nonlinear association after adjusting for confounding variables in the restricted cubic spline analysis. Hazard ratios (HRs) of all-cause mortality were particularly positively related to the level of TC/HDL-C ratio in the higher range >5.07 and in the lower range <2.86 (HR 1.26; 95% CI 1.10, 1.45; HR 1.18; 95% CI 1.00, 1.38, respectively), although the HRs of cardiovascular disease mortality showed no difference among the five groups. In the two-piecewise linear regression model, a TC/HDL-C ratio range of ≥4.22 was positively correlated with cardiovascular mortality (HR 1.13; 95% CI 1.02, 1.25). In the subgroup analysis, a nonlinear association between TC/HDL-C and all-cause mortality was found in those aged <65 years, men, and the no lipid drug treatment population. A nonlinear association between the TC/HDL-C ratio and all-cause mortality was found, indicating that a too-low or too-high TC/HDL-C ratio might increase all-cause mortality. However, for cardiovascular mortality, it does not seem so. The cutoff value was 4.22. The individuals had higher cardiovascular mortality with a TC/HDL-C ratio >4.22.