Most of the Chinese crude oil is easy to curdle and has high viscosity, so heating transportation is usually selected. Energy consumption by this method mainly comes from furnaces and pumps. Currently, operating parameters of these pipelines were determined according to experience of dispatch. It cause high energy consumption and high cost of pipeline running, so it could not adapt to energy conservation policy. The present study focused on consuming lowest energy to operate oil transportation line. To begin with, several optimization variables were set which included pump combinations, suction pressure, discharge pressure, and station temperature. Then constraint conditions were set to establish an optimal mathematical model of running transportation line. Furthermore, genetic algorithm was used to solve the model, in meantime, selection operation, cross operation and mutation operation in the genetic algorithm were improved. Finally, a crude oil pipeline running optimization software was developed. Through optimal analyzing, S-L transportation line and contrasting with the actual working conditions, it was found that optimal operation scheme could reduce energy consumption by 5% - 9%. In addition, optimal operation scheme also considered the effect of seasons and flow on energy consumption of S-L transportation line.