In order to achieve carbon peak and neutrality goals, many low-carbon operations are implemented in ports. Integrated energy systems that consist of port electricity and cooling loads, wind and PV energy devices, energy storage, and clean fuels are considered as a future technology. In addition, ports are important hubs for the global economy and trade; logistics optimization is also part of their objective, and most port facilities have complex logistics. This article proposes an energy–logistics collaborative optimization method to fully tap the potential of port-integrated energy systems. A logistics–energy system model is established by deeply examining the operational characteristics of logistics systems and their corresponding energy consumption patterns, considering ships’ operational statuses, quay crane distribution constraints, and power balances. To better represent the ship–energy–logistics optimization problem, a hybrid system modeling technique is employed. The case of Shanghai Port is studied; the results show that costs can be reduced by 3.27% compared to the traditional optimization method, and a sensitivity analysis demonstrates the robustness of the proposed method.