In the one-step self-assembly synthesis of metallic nanocrystals in ordered mesoporous carbon (OMC), the surfactant functionalizes well as the structure directing agent and mesopore template. Interestingly, this work demonstrates another unusual role the surfactant plays: tuning the size of the nanocrystals. Our investigation shows that the decreasing molecular weight of the PS segment of PEO-b-PS leads to sequentially reduced PtRu particle sizes of 4.4, 3.9, and 2.9 nm, while F127 which has a distinctly smaller hydrophobic PO domain with a bending structure in the micelles successfully results in sub-2 nm PtM (M = Ru, Ir, Rh, Pd) nanoclusters in OMC. This well indicates that the nanocluster size is largely decided by the volume of the hydrophobic segment of the surfactant to which the metallic precursor is linked. The smaller the volume, the fewer the precursor molecules are adsorbed, and the smaller the alloy nanoclusters. In the electrocatalytic methanol oxidation reaction, the mass activity of PtRu-1.6/OMC with 1.6 nm PtRu clusters at 0.87 V reaches 1.07 A mgPt-1, which is 2.9 times that of commercial PtRu/C with an average alloy size of 2.7 nm. In principle, a wide range of ultrafine metallic clusters embedded in OMC can be prepared via this route for various applications.