The influence of boron (B) and cerium (Ce) grain boundary (GB) co-segregation on the precipitates formation of S31254 during 950–1050 °C was studied through a new heat treatment process. The results show that B and Ce segregate at GBs by air cooling and diffusion at 300 °C. The segregation of B and Ce at GBs inhibits formation of σ phases. B can dissolve in precipitates, which leads to the serrated GBs. Ce can't dissolve in precipitates, which makes the distribution of the precipitates more discontinuous. There is still nano-scale precipitates with the addition of B and Ce after aging for 180 min at 1050 °C. B and Ce at GBs promote mechanical properties of S31254.