A simple soft-template route was developed to synthesize magnetic FeNi alloy ordered mesoporous carbons (FeNi/OMCs). The effects of Fe(NO3)3 and Ni(NO3)2 loading amount on the structural parameters, the morphologies and magnetic properties of the samples were evaluated. The experimental results showed that with the increasing loading amount of metal nitrates, the ordering, the specific surface area and the total pore volumes of FeNi/OMCs decreased, while the average crystal sizes of FeNi alloy (17.9–26.1nm) increased. The saturation magnetization strength could be easily adjusted by varying the amount of metal nitrates.