This article introduces an optimization model for container liner services that simultaneously optimizes the shipping route and the container slot allocation on vessels by considering the interactions between the container shipping scheme and the transport demand in the ports. The model consists of two input factors and two processes. The input factors include the shipping scheme and the transport demand in the ports. The processes relate to the optimization of the shipping scheme for a fixed transport demand and the adjustment of the transport demand for a given shipping schedule. We demonstrate the model in an empirical case study on liner service optimization on the trade route between East Asia and West Europe.