A simple and facile synthetic method to incorporate Pt nanoparticles inside the mesopores of ordered mesoporous carbons (OMCs) is reported. The Pt/OMCs nanocomposite was characterized by transmission electron microscopy (TEM), X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS), Raman spectroscopy, and nitrogen adsorption–desorption. The results show that the incorporation of Pt nanoparticles inside the pores of OMCs does not change the highly ordered two-dimensional hexagonal mesostructure of OMCs matrix. Nonenzymatic amperometric sensor of hydrogen peroxide and glucose based on the Pt/OMCs nanocomposite-modified glassy carbon (GC) electrode is developed. Compared with the original OMCs-modified electrode, the Pt/OMCs-modified electrode displays improved current response towards hydrogen peroxide and gives linear range from 2 to 4212 μM. At an applied potential of −0.08 V, the Pt/OMCs nanocomposite gives linearity in the range of 0.5–4.5 mM glucose in neutral buffered saline solution. This glucose sensor also exhibits good ability of anti-interference to electroactive molecules. The combination the unique properties of Pt nanoparticles and the ordered mesostructure of OMCs matrix guarantees the enhanced response for hydrogen peroxide and glucose.