In this work, three ordered mesoporous carbons (OMCs) with different structural parameters were synthesized by a simple variation of the hydrothermal temperature of the silica templates (SBA-15). X-ray diffraction and nitrogen adsorption-desorption results show these OMCs exhibit an ordered 2D hexagonal mesostructure with tunable pore diameter. OMC-modified glassy carbon electrodes exhibit efficient electrocatalytic reactivity toward oxidation of morphine (MO). The amperometric detection of MO in pH 7.0 phosphate buffered saline at þ 0.39 V versus Ag/AgCl is the lowest potential reported to-date. A linear range from 0.2 to 197.6 mM and a detection limit of 0.03 mM MO were obtained.