The electrocatalyst for oxygen reduction reaction (ORR) plays an important role in determining the performance, cost and durability of fuel cells and metal–air batteries. In this study, low-cost and highly active phosphorus (P)-doped carbon xerogel electrocatalyst for the ORR was facilely synthesized. The catalytic activity of P-doped carbon xerogel for the ORR in 0.1M KOH solution has been studied by using a rotating ring-disk electrode (RRDE) technique. The RRDE results show that P-doped carbon xerogel exhibits excellent catalytic activity for the ORR and long-term stability in basic media. The ORR on P-doped carbon xerogel with optimized amount of P mainly favors a direct four electron pathway. The high electrocatalytic activity and durability of P-doped carbon xerogel are primarily attributed to the P-doping in the carbon lattice. Furthermore, the amount of P incorporated into carbon instead of the specific surface area of the P-doped carbon xerogel is found to play a critical role in the ORR activity enhancement and the ORR pathway modification.