This study developed a new online driving cycle prediction method for hybrid electric vehicles based on a three-dimensional stochastic Markov chain model and applied the method to a driving-cycle-aware energy management strategy. The impacts of different prediction time lengths on driving cycle generation were explored. The results indicate that the original driving cycle is compressed by 50%, which significantly reduces the computational burden while having only a slight effect on the prediction performance. The developed driving cycle prediction method was implemented in a real-time energy management algorithm with a hybrid electric vehicle powertrain model, and the model was verified by simulation using two different testing scenarios. The testing results demonstrate that the developed driving cycle prediction method is able to efficiently predict future driving tasks, and it can be successfully used for the energy management of hybrid electric vehicles.