The prohibitive cost and scarcity of the platinum-based eletrocatalysts for oxygen reduction reaction (ORR) in fuel cells and metal-air batteries hamper dramatically the commercialization of theses clean-energy technologies. Here, we develop a highly active nitrogen-doped carbon nanofiber (N-CNF) aerogel metal-free ORR electrocatalyst, prepared by direct pyrolysis of a cheap, green, and mass-producible biomass, i.e., bacterial cellulose, followed by NH3 activation. The N-CNF aerogel inherits the three-dimensional nanofibrous network of bacterial cellulose and meanwhile possess high density of N-containing active sites (5.8at%) and high BET surface area (916m2/g). Such N-CNF aerogel shows superior ORR activity (half-wave potential of 0.80V versus reversible hydrogen electrode) and high selectivity (electron-transfer number of 3.97 at 0.8V), and excellent electrochemical stability (only 20mV negative shift of half-wave potential after 10,000 potential cycles) in alkaline media. The ORR activity of N-CNF aerogel exceeds that of NH3-treated carbon blacks, carbon nanotubes as well as reduced graphene oxide aerogels, and that of most reported metal-free catalysts. Importantly, when used as a cathode catalyst for constructing the air electrode of Zn-air battery, the N-CNF aerogel exhibits high voltages of 1.34 and 1.25V at the discharge current densities of 1.0 and 10mAcm−2, respectively, which are highly comparable with the state-of-the art Pt/C catalyst (20wt% Pt, BASF), indicating the great potential of this metal-free catalyst as a promising alternative to the Pt/C for alkaline fuel cells and metal-air batteries.