The invention discloses a catalyst for a fuel cell and a preparation method of the catalyst. The catalyst is a nitrogen-hybridized carbon-based catalytic material containing one or more metals. The catalyst is an M-NC single-metal nitrogen-carbon catalyst, a double-metal nitrogen-carbon catalyst or a multi-metal nitrogen-carbon catalyst, wherein M is one or more of metal elements. The catalyst isof a large-volume pore structure, has excellent gas and electron conductivity, high graphitization degree and nitrogen content, large specific surface area, multiple active sites, uniform distribution, high activity and strong stability, has the advantages of high catalytic activity, long service life and low comprehensive cost, and can be used for proton exchange membrane fuel cells and direct alcohol fuel cells. In addition, the preparation method is simple in process, controllable in operation, mild in condition, environmentally friendly and high in universality, no solvent is used in the synthesis process, various raw materials are subjected to a solid-phase thermal reaction to directly form a precursor and then are carbonized, the raw material cost is low, and the utilization rate ishigh.