The invention discloses a preparation method of leaf-based nitrogen-doped porous carbon, and application of the leaf-based nitrogen-doped porous carbon in oxygen reduction electro-catalysis in a full pH range. The preparation method comprises the following steps: cleaning, drying and grinding leaf-based biomass; weighing a certain amount of a biomass powder material, soaking the biomass powder material in an acetic acid-sodium acetate solution containing hemicellulase, standing for a period of time at a constant temperature, hydrolyzing, filtering, washing, drying, pre-carbonizing in an inert atmosphere, cooling to room temperature, grinding into powder, weighing the powder, a nitrogen source and an activating agent according to a mass ratio, performing high-energy vacuum mechanical ball milling, performing high-temperature carbonization on the ball-milled mixture in an inert atmosphere, performing acid pickling, filtering washing with water until filtrate is neutral, and drying to obtain the nitrogen-doped porous carbon material. Biomass is modified by utilizing an enzyme synergistic high-energy vacuum mechanical force ball milling method, and the prepared nitrogen-doped porous carbon material is large in specific surface area, obvious in hierarchical pore structure and rich in nitrogen content, and has excellent ORR electrocatalytic activity in a whole pH range (0-13).