In post-contingency situations before more components are isolated by protection systems, power transformers may sustain thermal overloading. Traditional ways to alleviate that, like generator and load reconfiguration by optimal power flow are sometimes time-consuming due to lack of generators with quick ramping rate, which may result in failure to control the thermal statement. To quickly respond to emergencies and minimize load curtailment before power transformer thermal protection systems are triggered, energy storage systems are used to control power flow for power transformer thermal overloading mitigating. An optimal power flow model was implemented, incorporating power transformer emergency overloading according to IEEE Std. C57.91-2011, minimum load shedding and energy storage systems. The performance of the proposed method has been evaluated versus traditional optimal power flow method. Test results suggest that the proposed method can control power transformer thermal overloading with less load shedding.