Due to the complexity of tailoring the wing flexibility and selecting favorable kinematics, the design of flapping wings is a considerably challenging problem. Therefore, there is an urgent need to investigate methods that can be used to design wings with high energy efficiency. In this study, an optimization model was developed to improve energy efficiency by optimizing wing geometric and kinematic parameters. Then, surrogate optimization was used to solve the design optimization model. Finally, the optimal design parameters and the associated sensitivity were provided. The optimized flapping wing, inspired by hummingbirds, features large geometrical parameters, a moderate amplitude of the flapping angle, and low frequency. With the spanwise twisting deformation considered in the parameterization model, the optimization solver gave an optimized wing with a pitching amplitude of approximately 39 deg at the root and 76 deg at the tip. According to the sensitivity analysis, the length of the wing, flapping frequency, and flapping amplitude are the three critical parameters that determine both force generation and power consumption. The amplitude of the pitching motion at the wing root contributes to lowering power consumption. These results provide some guidance for the optimal design of flapping wings.