With the increasingly serious problem of global climate change, the goals of carbon peaking and carbon neutrality have been established in China. As logistics hubs and cargo distribution centers, the ports have highlighted carbon emission problem. Aiming at optimization problem of port operation scheduling, considering the key factors such as ship arrival time, cargo handling demand, quay crane operation capacity, and carbon emission cost, an optimization model of port operation scheduling was constructed for minimizing both carbon emission cost and terminal operating expense, and a port operation scheduling algorithm based on Enhanced NSGA-Ⅱ (Non-dominated Sorting Genetic Algorithm Ⅱ) (E-NSGA-Ⅱ) under the goals of carbon peaking and carbon neutrality was proposed. Firstly, the coding strategy, population initialization method and crossover and mutation operations of the algorithm were adjusted. Secondly, gene repair operators of infeasible solutions were designed, and adaptive crossover and mutation probability mechanisms were introduced. Experimental results show that compared with FCFS (First Come First Service) scheduling algorithm, the proposed algorithm reduces the total cost of model solving by 7.9%, the carbon emission cost by 19.7%, and the terminal operating expense by 6.5%. The above research results enrich the multi-objective optimization algorithm and port operation scheduling theory, and provide strong support for port enterprises to achieve green scheduling, reduce operating cost, and improve economic benefits.