Periodic arrays of compositionally graded Cu-Ni alloy nanopillars (100 or 200 nm in diameter and 450 nm in height) have been fabricated by means of potentiostatic electrodeposition into patterned Au/Ti/Si(111) substrates using a single electrolytic solution. The pillars do not bend after the template removal but remain straight and perfectly attached to the substrate. The average composition of the alloy nanopillars can be tuned between 34 and 70 at% of Ni by varying the applied potential from a [Ni(ii)]/[Cu(ii)] = 95.2 electrolytic solution. The nanopillars are Ni-rich at the bottom with a compositional gradient about ±20-25% above/below the average composition. The magnetic characterization reveals that all the nanopillars are ferromagnetic with coercivity values around 100-150 Oe (in-plane) and 200-500 Oe (out-of-plane), which are larger than those for continuous films of similar average composition. Atom probe tomography of the Cu-rich Cu-Ni nanopillars indicates the segregation of Ni, which would explain their unexpected magnetic character. The graded-anisotropy ferromagnetic Cu-Ni pillars could be potentially applied in several fields including micro/nano-electromechanical systems (MEMS/NEMS), magnetic recording media or spintronics. © The Royal Society of Chemistry 2013.