In this study, we report the findings that the C–N composites containing Ni and Co (Ni1Co1/C–N, Ni3Co1/C–N, Ni6Co1/C–N, Ni9Co1/C–N, Ni10Co0/C–N and Ni0Co10/C–N) can be produced by direct pyrolysis of the NiCo-doped polyaniline (PANI) precursors in N2 atmosphere at 800∘C and show efficient electroactivity for oxygen reduction reaction (ORR) in alkaline media. Distribution and compositions of the catalysts were characterized by SEM, TEM, EDS and XRD techniques. The catalysts were loaded on carbon paper to prepare gas diffusion electrodes, in which electrocatalytic activity for ORR in alkaline media was investigated by voltammetric techniques. The ORR current density on these carbon paper-supported NiCo/C–N catalysts exhibits a linear increase with the negative shift of ORR potential. The ORR onset potential is around −0.2V (versus Ag/AgCl) in alkaline media. Among the prepared catalysts, the catalyst Ni6Co1/C–N presents the largest ORR current density, which is 68.5mAcm−2@−0.8V (versus Ag/AgCl) in alkaline media. Moreover, Ni6Co1/C–N catalyst also presents good electrocatalytic activity stability for ORR.