The invention discloses a preparation method of a Fe and N-doped porous carbon nanofiber applicable to a cathode catalyst for a polymer fuel cell. The preparation method comprises the following concrete steps: mixing a carbon nanofiber with pyrrole in proportion, adding a certain amount of a ferric iron ion solution, polymerizing the pyrrole, uniformly coating the surface of the carbon nanofiber with the polymerized pyrrole, removing unreacted impurities, performing suction filtration, naturally drying, soaking the carbon nanofiber coated with the polymerized pyrrole in the iron ion solution, absorbing ferric iron ions until the saturation rate is reached, then, performing suction filtration and drying, and performing high-temperature treatment, acid reflux and high-temperature treatment to obtain an efficient Fe and N-doped porous carbon nanofiber electrocatalyst. The Fe and N-doped porous carbon nanofiber is prepared from the carbon nanofiber, pyrrole and iron ions as precursors; raw materials are low in price and easily available; the Fe and N-doped porous carbon nanofiber can be easily produced on a large scale and can replace an expensive Pt-based material to serve as the stable and efficient catalyst for oxygen reduction reaction of the fuel cell.