This paper proposes a novel multi-level optimization method for the management of port energy systems with high penetration of renewable energy considering the dual-carbon policy, to support the main power grid while supplying power to local loads. Firstly, a cost optimization model for the port energy system is established, and corresponding constraint conditions are provided. Then, a three-stage energy management optimization method is proposed by combining rule-based algorithm with firefly algorithm. Then, based on real-time grid price and battery energy level, the optimal charging and discharging decisions for the energy storage system are formulated. Secondly, a dynamic pricing scheme is proposed to encourage both parties (ports and ships) to adopt alternative marine power (AMP) technology. Finally, for performance evaluation, the proposed method will be applied to a port system connected to a 2 MW AMP load. The results show that the proposed method can effectively schedule energy equipment and save about 20% or more of the cost of the system, verifying the effectiveness of the proposed method.