A general epoxidation of aromatic and aliphatic olefins has been developed under mild conditions using heterogeneous CoxOy–N/C (x=1,3; y=1,4) catalysts and tert-butyl hydroperoxide as the terminal oxidant. Various stilbenes and aliphatic alkenes, including renewable olefins, and vitamin and cholesterol derivatives, were successfully transformed into the corresponding epoxides with high selectivity and often good yields. The cobalt oxide catalyst can be recycled up to five times without significant loss of activity or change in structure. Characterization of the catalyst by XRD, TEM, XPS, and EPR analysis revealed the formation of cobalt oxide nanoparticles with varying size (Co3O4 with some CoO) and very few large particles with a metallic Co core and an oxidic shell. During the pyrolysis process the nitrogen ligand forms graphene-type layers, in which selected carbon atoms are substituted by nitrogen.