Pd@nitrogen-doped carbon nanoreactors (Pd@NC) were synthesized by partially embedding small Pd nanoparticles in the inner wall of the nitrogen-doped carbon shells. Such embedment is critical for improving catalytic activity and stability.