The lateral inlet/outlet plays a critical role in the connecting tunnels of a water delivery system in a pumped hydroelectric storage (PHES). Therefore, the shape of the inlet/outlet was improved through computational fluid dynamics (CFD) optimization based on optimal surrogate models. The CFD method applied in this paper was validated by a physical experiment that was carefully designed to meet bidirectional flow requirements. To determine a good compromise between the generation and pump mode, reasonable weights were defined to better evaluate the overall performance. In order to find suitable surrogate models to improve the optimization process, the best suited surrogate models were identified by an optimal model selection method. The optimal configurations of the surrogate model for the head loss and the velocity distribution coefficient were the Kriging model with a Gaussian kernel and the Kriging model with an Exponential kernel, respectively. Finally, a multi-objective surrogate-based optimization method was used to determine the optimum design. The overall head loss coefficient and velocity distribution coefficients were 0.248 and 1.416. Compared with the original shape, the coefficients decrease by 6.42% and 40.28%, respectively. The methods and findings of this work may provide practical guidelines for designers and researchers.