The rather complex correlation between the microstructure and the magnetic properties is demonstrated for two types of high-quality RE-TM permanent magnets (pms), namely nanocrystalline RE2Fe14B (RE = Nd,Pr) and nanostructured Sm2(Co,Cu,Fe,Zr)17 pms. The detailed analysis of this correlation for both pm materials leads to a quantitative comprehension of the hardening mechanism enabling the optimization of their magnetic properties and temperature dependences. In the case of RE2Fe14B, isotropic bonded pms are fabricated showing maximum energy products in the order of 90 kJ/m3. In the case of Sm2(Co,Cu,Fe,Zr)17, magnets with excellent high-temperature magnetic properties are tailored. Hereby, the investigations in addition provide important clues to the evolution of the characteristic microstructural and magnetic properties and to the role of the involved elements.