An association between prognosis and high sodium levels in Traumatic Brain Injury (TBI) patients in Intensive Care Units (ICUs) has been noted, but limited research exists on the ideal sodium level in these patients or the impact on early mortality, using the MIMIC-IV database. A retrospective survey was conducted on TBI patients from the MIMIC-IV database. Patients were divided into two categories based on their highest serum sodium level within 24 h of admission exceeding 145 mmol/L: those with hypernatremia, and those with moderate-to-low sodium levels. Collected covariates encompasses demographic, clinical, laboratory, and intervention variables. A multivariate logistic regression model was implemented to forecast in-hospital mortality. The study included 1749 TBI patients, with 209 (11.5%) experiencing in-hospital deaths. A non-linear test exposed an L-shaped correlation between sodium level and in-hospital mortality, with mortality rates increasing after a turning point at 144.1 mmol/L. Compared to the moderate-to-low group's 9.3% mortality rate, the hypernatremia group had a significantly higher mortality rate of 25.3% (crude odds ratio = 3.32, 95% confidence interval: 2.37 ~ 4.64, p < 0.001). After adjusting for all covariates, the hypernatremia group continued to show a significant correlation with higher mortality risk (adjusted odds ratio = 2.19, 95% confidence interval: 1.38 ~ 3.47, p = 0.001). This trend remained consistent regardless of the analyses stratification. The study reveals an L-shaped relationship between sodium levels and in-hospital deaths, with a pivotal point at 144.1 mmol/L. TBI patients displaying hypernatremia were independently linked to higher in-hospital mortality, underlining the need for further studies into targeted management of sodium levels in these patients.