The Cu, Co and Ni nanometal embedded ordered mesoporous carbons (NM-OMCs) were fabricated by a soft-template method using phenol/formaldehyde as carbon source and triblock copolymer F127 as template agent. The morphology, structure, surface physicochemical properties and pore structure of the NM-OMCs were characterized using X-ray diffraction (XRD), Fourier transform infrared spectroscopy (FTIR), scanning electron microscope (SEM), transmission electron microscopy (TEM), X-ray photoelectron spectroscopy (XPS) and nitrogen adsorption-desorption isotherms. Their potential application to the electrocatalytic degradation of aniline was investigated using electrochemical impedance spectroscopy (EIS), cyclic voltammetry (CV) and OH radicals generation test. Furthermore, the electrochemical oxidation process of aniline was also investigated in the presence of the OMC-based catalyst particles suspended in a Na2SO4 solution using a PbO2 anode. Results revealed that the NM-OMCs inherited the ordered mesostructure of pristine OMC and the metal nanoparticles (Cu, Co or Ni) were embedded in the carbon framework. The Cu-OMC exhibited significantly higher catalytic activity than OMC and other NM-OMCs for the electrooxidation of aniline. In electrochemical oxidation process of aniline, nearly all of aniline could be degraded after 120min of electrolysis with Cu-OMC particles as catalyst, while 89%, 92%, and 97% with OMC, Co-OMC and Ni-OMC catalysts, respectively, obviously higher than 76% of electrochemical oxidation without assistance of catalysts. After characterization of intermediates, a possible electrochemical degradation pathway of aniline was proposed.