This paper theoretically estimates the dynamic pile–soil interaction and the group efficiency factor for pile group in layered soil through energy‐based method. The vertical dynamic interaction of partially embedded single piles and their surrounding layered soil is analytically deduced from Hamilton's principle. Combined with a series of numerical simulations, the soil attenuation factor from energy method is modified for adapting to the wave speed variation in various layers. Then, the pile‐to‐pile interaction factor is directly solved with the help of the transfer‐matrix method. The dynamic governing equation of pile group with an elevated rigid cap is established by superposing the pile‐to‐pile interaction factors. Finally, the dynamic impedance of pile group is obtained and derived into a group efficiency factor. Compared with the plane strain method, this present method can produce a more suitable soil attenuation factor and a dynamic interaction factor at low frequency range, which is exploited for practical engineering design. The effects of subsoil layer, subsoil layer, and unembedded pile segment on group efficiency factor are investigated. The results show that the real part of group efficiency factor decreases at high frequency range for a small pile spacing, which may be detriment to the pile group capacity. Besides that, the combined effects of unembedded segment and weak surface soil on group efficiency factor are highlighted.