In the context of the deep-sea transportation supply chain, this paper addresses the complex decision-making problem of vessel allocation and carbon emission optimization for container shipping routes. A bi-level programming model is established, with the upper level aiming to minimize the total operational cost and the lower level focusing on minimizing carbon emissions. Using an example of an operator with five different types of vessels, a genetic algorithm is employed to determine the optimal vessel allocation scheme. The results indicate that the vessel allocation scheme obtained through multiple iterations of the model effectively reduces both carbon emissions and operational costs. Under the condition that the preset labor cost increases year by year, the use of model optimization can significantly reduce the growth of total operating costs. This paper provides theoretical support and practical guidance for shipping companies aiming to optimize decision-making in order to reduce operational costs and carbon emissions.