The oxidative cleavage and functionalization of C–C bonds in 1,2-diols have become a rapidly growing field of chemical transformations. However, achieving it in a direct and selective manner, especially using metal-free-based catalysts, remains challenging because of the inherent kinetic inertness and thermodynamic stability of C–C bonds. Herein, we describe a general and efficient metal-free N-doped porous carbon material that enables the synthesis of nitriles from 1,2-diols. A broad array of structurally distinct mono- and multisubstituted 1,2-diols can smoothly undergo cleavage of C–C bonds to obtain nitriles using O2 as the oxidant and aq. NH3 as the nitrogen source. Notably, the oxidative cleavage and amidation of 1,2-diols to deliver amides can also be achieved with NH4OAc as a nitrogen source. A series of control experiments verify that the preference of selectivity for amides stems from the synergistic effect of the carboxylic acid group in catalysts and carboxylate anions. This protocol exhibits easy scalability, broad substrate scope, remarkable functional group tolerability, and recyclable catalyst. Characterization analysis and experimental data reveal that the high catalytic activity of the N-doped carbon materials is mainly attributed to graphitic-N species and the large specific surface area.