Described here is the feasible modification of a graphitic carbon nitride polymer using Prato's reaction with in situ formed azomethine ylides. These novel carbon nitrides with designable organic functional groups, and tailorable surface and structure properties illustrated excellent performance in the selective oxidation of 3,5,5-trimethylcyclohex-3-en-1-one using atmospheric oxygen.