In recent years, China’s economy has developed rapidly, especially in the Internet industry and e-commerce. These have led to the rapid growth of the express industry. The express delivery industry has a huge demand for transportation. However, due to the speed and convenience of highway, the highway transportation occupies a large market share. Due to relevant policies and the inadequate transportation capacity resource allocation, a large number of medium and long-distance freight flows that are suitable for railway transportation choose highway transportation. This not only greatly reduces the profits of the railway transportation department, increases the carbon emission of the transportation system, but also makes the load of some road sections higher than expected. Therefore, in order to protect the environment and enhance the market competitiveness of the railway department, the optimization of the railway express freight train schedule is an urgent task.On the basis of previous research results, this paper first calculates the generalized cost of highway and railway from the perspective of the cargo owner, and finds out whether the cargo owner will choose railway, that is, which freight flow will be attracted to the railway. Then, with the maximization of the profits of the railway department as the objective function, the 0-1 integer programming model is established under the constraints of railway transportation capacity, freight transportation time and decision variable value restrictions, etc. Finally, a small-scale example is designed. After put the data into the model, the optimized operation plan of railway express freight trains is obtained.