Reasonable ship berthing methods are crucial to the safe operation of docks. Currently, the operational recommendations for ship berthing given in national codes are rather general and do not provide requirements for specific docks and ship berthing, which cannot meet the actual needs. In this study, a novel framework for the optimization of ship berthing methods (OSBM) is proposed, which uses the "berthing characteristics-dock response" dataset collected in the field or obtained from finite element analysis, constructs four kinds of surrogate models with low sample requirements and performs the optimal selection, and then quickly inverts the feasible domains of berthing based on the surrogate models. Finally, the reliability and practicability of the proposed method are verified with an example of a high-pile wharf in Jiangsu Province, China. The results show that the surrogate model can replace the finite element model for berthing response analysis, which greatly improves the computational efficiency; it can quickly investigate and judge for different ship types and specific docks and give more accurate and reasonable regions of berthing.