A COOH-terminated nitrogen-doped carbon aerogel exhibited 100% selectivity to two-electron oxygen reduction, exceeding reported carbonaceous and noble metal catalysts. The optimal electrode with the synergistic effect of C-N/C-COOH resulted in a minimum ηO2/H2O2 and gave an evolution rate of 60 mg L-1 g-1 h-1 for H2O2 with satisfactory mechanical and electrochemical stability for practical applications.