Polypyrrole-based ordered mesoporous carbons (OMCs) were synthesized via chemical vapor infiltration of pyrrole into pores of the SBA-15 and SBA-16 silica templates containing iron(III) chloride catalyst (FeCl3). After carbonization of polypyrrole at 800 °C and etching of the silica templates with hydrofluoric acid solution, nitrogen-doped and graphitic OMCs with incorporated magnetic nanoparticles were obtained. These materials were analyzed by CHNS elemental analysis, thermogravimetry (TG), nitrogen adsorption, small and wide angle powder X-ray diffraction (XRD), Raman spectroscopy, scanning, and transmission electron microscopy (TEM). The resulting carbon replicas retained the crystallographic symmetry of the silica templates: namely, P6mm in the case of the SBA-15 template, and Im3m in the case of the SBA-16 template. The uniformity, size, and volume of ordered mesopores in the carbon replicas were affected by structural properties of the templates used as shown by analysis of nitrogen adsorption isotherms and pore size distributions. A better infiltration of carbon precursor was achieved for the templates with larger pores, which resulted in the carbon replicas of improved adsorption and structural properties. Elemental analysis revealed the presence of nitrogen in the carbon replicas studied in the range of 3−8 wt %, whereas TG analysis of the replica samples in air gave about 2−5% residue, which was identified as hematite (Fe2O3). The presence of graphitic domains was confirmed by characteristic TG oxidation profile above 400 °C, the D and G bands on the Raman spectra, and the intense reflections on the wide angle XRD patterns. Powder XRD also showed the presence of extra-framework magnetic iron (α-Fe) and iron carbide (Fe3C) nanoparticles having crystallite size in the ranges of 40−80 and 20−40 nm, respectively. TEM images also revealed that these nanoparticles were larger than the carbon rods and pore widths of the SBA-15 carbon replica, which is in good agreement with the XRD-based estimation. The in situ EDS analysis of carbon rods and spheres showed that iron was present in the carbonaceous framework, which does not exclude the existence of much smaller nanoparticles, below 5 nm.