The magnetic configurations of cylindrical Co-rich CoNi nanowires have been quantitatively analyzed at the nanoscale by electron holography and correlated to local structural and chemical properties.The nanowires display grains of both face-centered cubic (fcc) and hexagonal close packed (hcp) crystal structures, with grain boundaries parallel to the nanowire axis direction. Electron holography evidences the existence of a complex exotic magnetic configuration characterized by two distinctly different types of magnetic configurations within a single nanowire: an array of periodical vortices separating small transverse domains in hcp rich regions with perpendicular easy axis orientation, and a mostly axial configuration parallel to the nanowire axis in regions with fcc grains. These vastly different domains are found to be caused by local variations in the chemical composition modifying the crystalline orientation and/or structure, which give rise to change in magnetic anisotropies. Micromagnetic simulations, including the structural properties that have been experimentally determined, allows for a deeper understanding of the complex magnetic states observed by electron holography.KEYWORDS magnetic configuration, magnetic nanowire, electron holography, vortex state, micromagnetic simulation, nanocylinder.One-dimensional magnetic nanostructures have for the past two decades been of increased interest for the development of future spintronic devices 1-4 motivated by concepts like Magnetic Race Track Memory 5 and the wish to manipulate magnetic domain walls (DW). Cylindrical nanowires (NWs) are particularly interesting candidates to reach this goal, much due to the fast DW motion induced by an external magnetic field or electric current, where theoretical studies have anticipated the absence of a Walker breakdown. 6,7 In addition, curvature effects have recently been proved to induce effects related to topology, chirality, and symmetry, 8 and unidirectional reversal process has been reported by engineering the geometry in multi-segmented nanowires. 9 However, to further technical developments in spintronics and a better control of DW motion, a thorough understanding of the fine structures of DWs in magnetic NWs, in which shape and crystal structure are contributing factors to the minimization of the system's magnetic energy, 10-13 is required.The magnetic configurations in various Co-based cylindrical nanowires have previously been studied in several publications, [13][14][15][16] which have revealed a strong influence of the NW's structural properties, 17 and thus a dependence of their fabrication process. 10,18,19 For instance, it has been shown that monocrystalline hcp phase can be obtained in pure Co NWs with the c-axis engineered with nearly perpendicular orientation to the NW axis. 10,20 The corresponding uniaxial magnetocrystalline anisotropy is then strong enough to challenge the large shape anisotropy of NWs. 10,21,22 In CoNi-alloy NWs, the amount of Ni content can modify the crystallographic phase: while C...