Nanowire arrays of the alloy, Co1−xZnx (0 x 0.2), with 20 and 35 nm diameters have been fabricated by the electrochemical deposition method into pores of anodized aluminum oxide (AAO) templates. Samples with different composition could be obtained by adjusting the concentration ratio of Co2+ and Zn2+ in the solution of the electrolyte. The structure and magnetic properties were characterized by scanning electron microscopy (SEM), atomic force microscopy (AFM) and alternating gradient force magnetometer (AGFM). It is found that the magnetic properties of the arrays are critically dependent on the compositions and diameter and thermal treatments. We found that the optimized composition for Co1−xZnx nanowire is around Co90Zn10 with 20 nm diameter annealed at 575 C in which the coercivity (Hc 2120 Oe) and squareness (Mr/Ms=0.98) have their maximum values consistently.