Rational design and optimization of metal-free electrocatalysts for the oxygen reduction reaction (ORR) is crucial for fuel cells and metal-air batteries. However, identifying design principle that links the active sites and their synergistic effects is far from satisfactory, especially for B,N-codoped graphene. Herein, we provide four B,N-codoped porous graphenes with tunable contents of pyridinic N, graphitic N, BC3 and C-B(N)O. BC3 shows multiple-fold specific activity compared with graphitic N and pyridinic N, while C-B(N)O offers no positive contribution. Density functional theory calculations indicate that the synergistic effect between graphitic N and BC3 can effectively facilitate the reduction of O2. These pinpoint that graphitic N and BC3 are the main active sites among various nitrogen or/and boron doping configurations. The most active catalyst exhibits superior activity than the commercial Pt/C catalyst using the RDE method in alkaline media, and displays comparable power density to Pt/C catalyst in Zn-air battery.