Piezoelectric materials, which respond mechanically to applied electric field and vice versa, are essential for electromechanical transducers. Previous theoretical analyses have shown that high piezoelectricity in perovskite oxides is associated with a flat thermodynamic energy landscape connecting two or more ferroelectric phases. Here, guided by phenomenological theories and phase-field simulations, we propose an alternative design strategy to commonly used morphotropic phase boundaries to further flatten the energy landscape, by judici ously introducing local structural heterogeneity to manipulate interfacial energies (that is, extra interaction energies, such as electrostatic and elastic energies associated with the interfaces). To validate this, we synthesize rare-earth-doped Pb(Mg 1/3 Nb 2/3 )O 3 –PbTiO 3 (PMN–PT), as rare-earth dopants tend to change the local structure of Pb-based perovskite ferroelectrics. We achieve ultrahigh piezoelectric coefficients d 33 of up to 1,500 pC N −1 and dielectric permittivity ε 33 /ε 0 above 13,000 in a Sm-doped PMN–PT ceramic with a Curie temperature of 89 °C. Our research provides a new paradigm for designing material properties through engineering local structural heterogeneity, expected to benefit a wide range of functional materials.