Several properties of hybrid systems made of iron nanowires coated with carbon are computed from first principles. In particular, we focus on how the presence of carbon determines the magnetic ordering. A quasi-one-dimensional fcc (or hcp) Fe structure favors ferromagnetic ordering, but when encapsulated into a C tube, antiferromagnetic ordering can become favorable. The spin polarization at the Fermi level is large for the bare nanowires, but it decreases due to hybridization with the carbon coating. Implications of these results for the fabrication of nanodevices, as well as for the appearance of exchange bias, are discussed.