The fueling of plasmas using frozen pellets in steady-state quiescent H-mode plasmas with edge-localized modes (ELMs) suppressed by external magnetic perturbations (RMPs) was successfully demonstrated on the EAST tokamak in plasmas with similar shapes to those in ITER with q 95 ~ 3.8, and triangularity δ ~ 0.45. During the fully suppressed-ELM phase using RMPs, the plasmas were refueled by deuterium pellets with a frequency of 5 Hz from ~40 cm above the mid-plane on the low field side. The results show that the pellet fueling would partially compensate density, which decreased due to the effect of pump-out induced by RMPs. It was interesting to discover that the stored energy of the plasma could be raised to the value from before RMP application using pellet injection, which is rarely reported in other tokamaks. As for ELMs, they reappeared with a size smaller than the ELMs before RMP application accompanied with a magnetic coherent mode termination, however, the ELMs were still mitigated to a certain extent. Meanwhile, a similar experiment using supersonic molecular beam injection fueling was also carried out, which confirmed that pellet fueling is better for raising plasma stored energy. This investigation on the synergistic effect of pellet fueling and RMPs would be useful for simultaneous control of plasma density and ELMs in high performance H-mode plasmas in future devices, such as ITER.