The selective oxidation of alcohols to carbonyl compounds is a crucial reaction in organic chemistry. In this study, we report the synthesis of nitrogen-doped mesoporous carbon material by hard template method using biomass derivative sucrose and melamine as carbon and nitrogen sources and silica sol as template agent. Using molecular oxygen as the oxidant, the obtained NC-900 exhibits excellent selectivity in the oxidation of primary alcohols to the corresponding aldehydes without generating over-oxidized acid. For example, under optimal reaction conditions, 4-methoxybenzyl alcohol is almost quantitatively converted to 4-methoxybenzaldehyde. The catalytic system showed robust tolerance to sensitive functional groups and demonstrated favorable reaction effects in gram-scale experiments and multi-step, one-pot reaction sequences. The catalyst was reused for 5 times, and its catalytic activity did not decrease significantly. Hammett correlation studies indicated that the reaction favored substrates with electron-donating substituents. Characterization and experimental results indicate that the synergistic effect of graphitic N and mesoporous structure plays a pivotal role in enhancing the catalytic activity of NC-900 in this transformation. The mechanism study shows that the reaction involves free radical process.