Nitrogen-doped carbon inverse opal (CIO-N) is synthesized by a two-step process involving the infi ltration of carbon-nitrogen precursors within opals followed by the thermolysis and removal of the opal structure in hydrofl uoric acid (HF). Undoped samples exhibit a refl ection peak in the red region of the spectrum whereas N-doped samples display shifts to the blue region of the spectrum as the nitrogen content is increased. The degree of crystallinity of CIO-N strongly depends upon the nitrogen content and on the size of the precursor silica particles used to prepare the inverted opals. In addition, the introduction of nitrogen into the samples is able to increase the electrical conductivity by one order of magnitude from 2 to 30 S cm −1 (at room temperature). All samples are characterized by scanning electron microscopy (SEM), transmission electron microscopy (TEM), X-ray diffraction (XRD), Raman spectroscopy, X-ray photoelectron spectroscopy (XPS), ultraviolet-visible (UV-Vis) spectroscopy, and electrical conductivity measurements. It is envisaged that CIO-N could have important applications in the fabrication of photonic crystals, photoconducting materials, molecular sensors, fi eld emission devices, capacitors, batteries, among many others.