Graphene nanoribbons (GNRs) and nanographenes synthesized by on-surface reaction using tailor-made molecular precursors offer an ideal playground for a study of magnetism towards nano-spintronics. Although the zigzag edge of GNRs has been known to host magnetism, underlying metal substrates usually veil the edge-induced Kondo effect. Here, we report the on-surface synthesis of unprecedented, π-extended 7-armchair GNRs using 7-bromo-12-(10-bromoanthracen-9-yl)tetraphene as the precursor. Characterizations by scanning tunneling microscopy/spectroscopy revealed unique rearrangement reactions leading to pentagon- or pentagon/heptagon-incorporated, nonplanar zigzag termini, which demonstrated Kondo resonance even on bare Au(111). Density functional theory calculations indicate that the nonplanar structure significantly reduces the interaction between the zigzag terminus and the Au(111), leading to a recovery of the spin localization of the zigzag edge. Such distortion of planar GNR structures offers a degree of freedom to control the magnetism on metal substrates.