An optimal control methodology for heavy-haul trains with the objective to optimize the train's operation in terms of energy consumption, velocity tracking, and operation safety is introduced. Rather than optimize the operation of the train at a specific position, this approach tries to schedule the train during a long period of travel in a model predictive control (MPC) framework; therefore, an effort is made so that the operation strategy of the train is optimal during a track section rather than at a specific position, as is done in existing literature. With this purpose, the cascade mass point model of the train is first simplified and transformed to facilitate the controller design. Then, an optimal controller is presented taking advantage of the MPC concept with the future behavior of the train and all operational constraints considered. Simulations demonstrate the feasibility as well as the advantages of the proposed approach.