This study aimed to investigate the relationship between serum phosphate levels, changes in serum phosphate levels, and 28-day mortality in patients with septic shock. In this retrospective study, data were collected from the Medical Information Mart for Intensive Care IV (MIMIC-IV) database between 2008 and 2019. Patients were divided into three groups according to the tertiles of serum phosphate levels. Kaplan–Meier curves and log-rank test analyses were used for survival analysis. Multivariate logistic regression, and restricted cubic spline (RCS) curve were used to explore the association between serum phosphate, delta serum phosphate levels and 28-day mortality. In total, 3296 patients with septic shock were included in the study, and the 28-day mortality was 30.0%. Serum phosphate levels were significantly higher in the non-survivor group than in the survivor group. The Kaplan–Meier curves showed significant differences among the three groups. Multivariate logistic regression analysis and the RCS curve showed that serum phosphate levels were independently and positively associated with the 28-day mortality of septic shock. Non-survivors had higher delta serum phosphate levels than survivors. Survival analysis showed that patients with higher delta serum phosphate levels had higher 28-day mortality. A non-linear relationship was detected between delta serum phosphate and 28-day mortality with a point of inflection at − 0.3 mg/dL. Serum phosphate levels were positively and independently associated with 28-day mortality in septic shock. Delta serum phosphate level was a high-risk factor for patients with septic shock.