Railway transportation, as one of the most energy-intensive industries, consumes a large amount of energy each year and train energy-efficient operations are paid more attention to reduce energy consumption and operation costs. This paper proposes to optimize the energy-efficient operation strategy and the integrated train timetable together. After considering the variable fiction and the speed limits and gradients of the real subway line, this paper applies a PSO analytical formulation to calculate the optimal speed profile with fixed trip time for each trip. Then paper designs a numerical algorithm to distribute the total trip time among different sections to minimize the total energy consumption and prove the optimality of the distribution algorithm. Finally, the paper presents some examples based on the operation data from the Yizhuang Line of the Beijing Subway. The simulation results show the optimality of energy-efficient operation strategy and integrated timetable.