As a promising energy storage system, potassium (K) ion batteries (KIBs) have received extensive attention due to the abundance of potassium resource in the Earth’s crust and the similar properties of K to Li. However, the electrode always presents poor stability for K-ion storage due to the large radius of K-ions. In our work, we develop a nitrogen-doped carbon nanofiber (N-CNF) derived from bacterial cellulose by a simple pyrolysis process, which allows ultra-stable K-ion storage. Even at a large current density of 1 A g−1, our electrode exhibits a reversible specific capacity of 81 mAh g−1 after 3000 cycles for KIBs, with a capacity retention ratio of 71%. To investigate the electrochemical enhancement performance of our N-CNF, we provide the calculation results according to density functional theory, demonstrating that nitrogen doping in carbon is in favor of the K-ion adsorption during the potassiation process. This behavior will contribute to the enhancement of electrochemical performance for KIBs. In addition, our electrode exhibits a low voltage plateau during the potassiation–depotassiation process. To further evaluate this performance, we calculate the “relative energy density” for comparison. The results illustrate that our electrode presents a high “relative energy density”, indicating that our N-CNF is a promising anode material for KIBs.