A catalyst consisting of structurally ordered mesoporous carbon containing a transition metal and a method for preparing the same are provided. The method for preparing the catalyst includes forming a mixture of a carbon precursor and structurally ordered mesoporous silica, carbonizing the mixture to form a composite, and removing mesoporous silica from the composite.