The paper expounded the characteristics of the pump-stopping hydraulic transient of a long-distance water supply system of gas-liquid two-phase flow and analyzed the main influence factors of the water hammer protection. By using an analysis method of inverse problem, taking the inertia flywheel rotational inertia, the inlet and exhaust valve diameter, one-way pressure regulating tower parameters and closing procedure parameters as decision variables, taking a characteristic line method as the basis, and taking the minimum of maximum water hammer pressure value and the lowest project investment as objective functions, the paper established a mathematical optimization model. The improved multi-objective genetic algorithm (MOGAs) was used to solve the optimization model. The application of a specific project shows that the most economical and reliable program of water hammer protection is acquired by using the numerical simulation method,witch can offered a new idea for the determination of water hammer protection program of long distance water supply system.