Prodigiosin (PG) is a secondary metabolite produced by Serratia marcescens which has a promising future in food, textile, and other industries due to its bright color and diverse biological activities. Currently, the production of PG is mainly restricted by the components of the fermentation medium and large losses during its extraction process, making large-scale industrial production impossible. In this study, a Box–Behnken design (BBD) was used to optimize the response surface of the fermentation medium of S. marcescens. The optimum medium composition was found to be sucrose, 16.29 g/L; peptone, 11.76 g/L; and tween 80, 2.64 g/L. This composition produced a PG amount of 1653.95 ± 32.12 mg/L, which is a 64-fold increase compared to the initial medium. A Box–Behnken design (BBD) was then used to optimize the response surface of the extraction process of PG, aiming to reduce loss during extraction. The optimal extraction conditions were determined to be a solvent fermentation liquid ratio of 9.12:1, an extraction temperature of 25.35 °C, and an extraction time of 30.33 min. These conditions resulted in a final PG production amount of 2142.75 ± 12.55 mg/L, which was nearly 84 times higher than the initial production amount of PG. These results provide essential theoretical and experimental support for the industrial production of PG.