Real-time simulation of power system transients inevitably demands computation time steps of the order of microseconds or even less. This enables Power-Hardware-inthe-Loop (PHIL) testing of new power system components, such as innovative energy storage systems, which is an efficient costeffective method to analyze the behavior of the component, prior to the grid connection. Having accurate real-time simulation models of the components is an essential step, prior to the PHIL testing. The new-generation Flywheel Energy Storage System (FESS), which uses High-Temperature Superconductors (HTS) for magnetic levitation and stabilization, is a novel energy storage technology. Due to quick response times, high power densities and high number of charging/discharging cycles, this new-generation FESS is especially suitable for enhancing power quality and transient stability in power systems. In this paper, the modeling and implementation of a FESS with HTS bearings in a real-time simulation environment are presented. The obtained real-time simulation results confirm the effectiveness of using such a FESS for improving power quality, e.g. voltage sag compensation in distribution networks and supporting the grid during frequency disturbances.