Power allocation is a crucial issue for hybrid energy storage system (HESS) in a plug-in hybrid electric vehicle (PHEV). To obtain the best power distribution between the battery and the ultracapacitor, the reinforcement learning (RL)-based real-time power-management strategy is raised. Firstly, a long driving cycle, which includes various speed variations, is chosen, and the power transition probability matrices based on stationary Markov chain are calculated. Then, the RL algorithm is employed to obtain a control strategy aiming at minimizing the energy loss of HESS. To reduce the energy loss further, the power transition probability matrices should be updated according to the new application driving cycle and Kullback-Leibler (KL) divergence rate is used to judge when the updating of power management strategy is triggered. The conditions of different forgetting factors and KL divergence rates are discussed to seek the optimal value. A comparison between the RL-based online power management and the rule-based power management shows that the RL-based online power management strategy can lessen the energy loss effectively and the relative decrease of the total energy loss can reach 16.8%. Finally, the strategy is verified in different conditions, such as temperatures, states of health, initials of SoC and driving cycles. The results indicate that not only can the RL-based real-time power-management strategy limit the maximum discharge current and reduce the charging frequency of the battery pack, but also can decrease the energy loss and optimize the system efficiency.