This investigation demonstrates the magnetic properties and nanostructures of CoPt(3) wire arrays that were fabricated by electrodeposition using a porous alumina template. The X-ray absorption analysis clearly verified the occurrence of a phase transition in CoPt(3) nanowires. This phase transition significantly influences the magnetic properties and enhances coercivity and squareness. The phase transition of CoPt(3) nanowires was from a random alloy distribution to anisotropically ordered CoPt(3) (L1(2)). The thermally induced phase transition of CoPt(3) nanowires to ordered L1(2) CoPt(3) through a "cluster-in-cluster" intermediate state via interdiffusion processes is revealed. The mechanism exhibited by these CoPt(3) nanowires is proposed to explain the strong correlation between their magnetic character and their atomic distribution.