This study aimed to investigate the relationship between serum ferritin level and prognosis in sepsis. It also explored the potential prognostic value of serum ferritin for predicting outcomes in sepsis based on a large public database. Sepsis patients in MIMIC-IV database were included. Different models including crude model (adjusted for none), model I (adjusted for age and gender) and model II (adjusted for all potential confounders) were performed. Smooth fitting curves were constructed for exploring the relationships between serum ferritin and mortalities of 28-day, 90-day, 180-day and 1-year. Receiver operator characteristic (ROC) curve analysis was utilized for assessing the predictive value of serum ferritin. 1947 sepsis patients were included. The mortalities of 28-day, 90-day, 180-day and 1-year were 20.18% (n = 393), 28.35% (n = 552), 30.30% (n = 590) and 31.54% (n = 614), respectively. In Model II (adjusted for all potential confounders), for every 1000 ng/ml increment in serum ferritin, the values of OR in mortalities of in 28-day, 90-day, 180-day and 1-year were 1.13 (95% CI 1.07–1.19,P< 0.0001), 1.15 (95% CI 1.09–1.21,P< 0.0001), 1.16 (95% CI 1.10–1.22,P< 0.0001) and 1.17 (95% CI 1.10–1.23,P< 0.0001), respectively. The relationships between serum ferritin level and outcomes were non-linear. The areas under the ROC curve (AUC) of ferritin for predicting mortalities of 28-day, 90-day, 180-day and 1-year were 0.597 (95% CI 0.563–0.629), 0.593 (95% CI 0.564–0.621), 0.595 (95% CI 0.567–0.623) and 0.592 (95% CI 0.564–0.620), respectively. The non-linear relationships between serum ferritin and clinical outcomes in sepsis were found. Serum ferritin had a predictive value for short-term and long-term outcomes in sepsis.