This study proposed a pumping-injection (P-I) groundwater management strategy based on a simulation-optimization (S-O) framework to mitigate seawater intrusion (SI). The methodology was applied to a real case in Longkou, China. A three-dimensional variable-density groundwater simulation model was established to simulate and predict the SI process. In the S-O framework, while solving the optimization model, it requires to call the simulation model for thousands of times, which will lead to enormous computational load. In this case, the Kriging and support vector regression (SVR) surrogate models were established for the simulation model respectively. Furthermore, the ensemble surrogate modeling technique was applied to construct the Kriging-SVR ensemble surrogate model. The most accurate surrogate model was selected as the substitute for the simulation model, saving considerable computing costs. The results show that the ensemble surrogate model performs better than the stand-alone surrogate models in accuracy, indicating that combining stand-alone surrogate models is a potential modeling method for the surrogate model of the variable-density groundwater simulation model. By solving the optimization model, the optimal pumping and injection schemes under different scenarios were obtained. The optimization results demonstrate that the proposed methodology is effective and stable in costal groundwater management.