The identification and development of efficient catalysts made of non-precious materials for oxygen reduction reaction (ORR) are essential for the successful operation of a wide range of energy devices. This study provides evidence that earth-abundant nanoparticles of transition metals encapsulated in a nitrogen-doped carbon shell (M@N-C, M = Fe, Co, Ni, Cu or Fe alloys) are promising catalysts in acidic solutions. By density functional theory calculations and experimental validations, we quantitatively propose a method of tuning the ORR activity of M@N-C by controlling the nitrogen-doping level, the thickness of the N-C shells and binary alloying. FeCo@N-C/KB was chosen as the best ORR catalyst because of its onset and half-wave potentials of 0.92 and 0.74 V vs a reversible hydrogen electrode (RHE), respectively, and its excellent durability. Furthermore, FeCo@N-C/KB possesses a high activity for the hydrogen evolution reaction (HER; -0.24 V vs RHE at -10 mA cm(-2)), thus demonstrating that it is a good bi-functional ORR and HER catalyst in acidic media.