The direct integration of 1D magnetic nanostructures into electronic circuits is crucial for realizing their great potential as components in magnetic storage, logical devices, and spintronic applications. Here, we present a novel template-free technique for producing magnetic nanochains and nanowires using directed self-assembly of gas-phase-generated metallic nanoparticles. The 1D nanostructures can be self-assembled along most substrate surfaces and can be freely suspended over micrometer distances, allowing for direct incorporation into different device architectures. The latter is demonstrated by a one-step integration of nanochains onto a pre-patterned Si chip and the fabrication of devices exhibiting magnetoresistance. Moreover, fusing the nanochains into nanowires by post-annealing significantly enhances the magnetic properties, with a 35% increase in the coercivity. Using magnetometry, X-ray microscopy, and micromagnetic simulations, we demonstrate how variations in the orientation of the magnetocrystalline anisotropy and the presence of larger multi-domain particles along the nanochains play a key role in the domain formation and magnetization reversal. Furthermore, it is shown that the increased coercivity in the nanowires can be attributed to the formation of a uniform magnetocrystalline anisotropy along the wires and the onset of exchange interactions.