Platinum-based ordered alloys have excellent catalytic performance for the cathodic oxygen reduction reaction (ORR) in fuel cells. However, these alloys exhibit a lower degree of ordering and larger crystal grains after heat treatment. Herein, a series of cyanamide group molecules (cyanamide, dicyandiamide, melamine) was employed as substrates to modify Pt-based alloys by promoting the binding between metal ions, leading to the preparation of ∼ 4 nm PtM (M = Co, Fe, Ni) ordered alloys after heat treatment. Among them, the PtCo ordered alloy prepared using hydrolyzed cyanamide with a unique resonance structure exhibits a high degree of order (93.1 %), and its mass activity of 0.915 A mgPt-1 at 0.9 V is superior to that of Pt/C. The theoretically calculated adsorption energies of these alloys demonstrate that the resonance structure of the cyanamide substrate is beneficial for alloy formation, thereby facilitating ordered alloy synthesis.