Mesoporous carbons are highly porous materials, which show large surface area, chemical inertness and electrochemical performances superior to traditional carbon material. In this study, we report the preparation of nitrogen-doped and undoped mesoporous carbons by an optimized hard template procedure employing silica as template, sucrose and ammonia as carbon and nitrogen source, respectively. Surface area measurements assert a value of 900 and 600 m(2) g(-1) for the best doped and undoped samples, respectively. Such supports were then thoroughly characterized by surface science and electron microscopy tools. Afterward, they were decorated with Pt and Pd nanoparticles, and it was found that the presence of nitrogen defects plays a significant role in improving the metal particles dimension and dispersion. In fact, when doped supports are used, the resulting metal nanoparticles are smaller (2-4 nm) and less prone to aggregation. Photoemission measurements give evidence of a binding energy shift, which is consistent with the presence of an electronic interaction between nitrogen atoms and the metal nanoparticles, especially in the case of Pd. The catalytic properties of electrodes decorated with such catalyst/support systems were investigated by linear sweep voltammetry and by rotating disk electrode measurements, revealing excellent stability and good activity toward oxygen reduction reaction (ORR). In particular, although Pd nanoparticles always result in lower activity than Pt ones, both Pt and Pd electrodes based on the N-doped supports show an increased activity toward ORR with respect to the undoped ones. At the same mass loading, the Tafel slope and the stability test of the Pt@N-doped electrocatalysts indicate superior performances to that of a commercial Pt@C catalysts (30 wt % Pt on Vulcan XC-72, Johnson Matthey).