Ferromagnetic nanowire arrays were fabricated into the nanoscale pores of anodic aluminum oxide template using an alternate current electrodeposition method. The nanowires grew from the bottom to top of the pore by chemical reduction deposition. The microstructures of the nanowires were observed as complete single crystalline structure and the subsequent nanowires for different materials grew with special oriented directions. For body-centered cubic Fe nanowires the growth direction is along <231>, and for face-centered cubic Ni nanowres the growth direction is along <002> respectively. The growth of nanowires was considered as a restricted growth model because of the narrow holes environment. The magnetic hysteresis loops were measured by vibration sample magnetometer system from 0 to 10000 Oe. The magnetic reversal mechanism and the maximum coercivity for nanowires arrays were discussed and calculated respectively according to a chain-of-spheres model. The magnetic nanowire arrays are considered have the applications prospects in high density magnetic recording media and high sensitive magnetic sensors.