The changes in the inclusions in 316L stainless steel before and after Ce addition were studied by adding different contents of Ce. The effects of rare earth Ce treatment on the modification of MnS inclusions in steel and the pitting corrosion resistance of 316L stainless steel are studied by field-emission scanning electron microscopy, laser confocal microscopy, the 6% FeCl3 corrosion weight loss test, and Tafel polarization curve test. The results show that the addition of Ce reduces the corrosion rate of stainless steel in 6% FeCl3 solution, and reduces the number and size of corrosion pits. The corrosion resistance is the best at a 0.0082% Ce content. In addition, the addition of Ce reduced the corrosion current density of stainless steel in 3.5% NaCl solution and increased the corrosion potential. The corrosion potential increased from −329 mV to −31.4 mV. Through Ce treatment, the grain is refined and the inclusions in the experimental steel are modified. With the increase in rare earth content, Mn S gradually transforms into Ce2O2 S inclusions. The morphology of the inclusions gradually change from the original long strips to a spherical shape, and the average size is significantly reduced, which improves the corrosion resistance of the stainless steel. The addition of rare earth Ce plays modifies the inclusions and purifies molten steel.