Nanostructures with a nitrogen-enriched mesoporous carbon framework (NEMCF) were prepared through a simple carbonization of cross-linked polystyrene-block-poly(2-vinylpyridine). NEMCF has a rich mesoporosity because of the morphological fidelity upon cross-linking and carbonization. Hybrids of NEMCF with metal nanoparticles (i.e., Ag@NEMCF) or binary metal alloys (i.e., Ag-Au@NEMCF) were prepared through a photochemical reduction or a photochemical reduction and galvanic replacement in combination. The inner architecture, the chemical composition and the graphitization of NEMCF and NEMCF-supported metal nanomaterials were studied with electron imaging, X-ray and Raman scattering, and electron spectra; the electrocatalytic activity of oxygen reduction in a basic electrolyte was measured with a rotating disk electrode. The nitrogen configurations of NEMCF were dominated by pyridinic and pyrrolic nitrogen, so that NEMCF displayed a two-electron transfer pathway for the oxygen reduction reaction (ORR). As Ag NPs and Ag-Au alloys composed of minor Au and major Ag were incorporated within the NEMCF matrix, a four-electron transfer pathway, a large kinetic current density and a small onset potential were obtained. Nevertheless, the electrocatalytic activity of the Ag-Au alloys within the NEMCF depended strongly on the compositional proportion, the size of the Au component and the extent of dispersion of the Ag-Au alloys.