Nitrogen-containing ordered mesoporous carbon (NOMC) was synthesized by using m-aminophenol (MAP) as a carbon and nitrogen co-precursor via a co-assembly process with F127 in aqueous phase and exhibited a good catalytic performance for selective oxidation of ethylbenzene.