Enzymatic hydrolysis lignin (EHL) as a by-product from biofuel processes is an abundant and low-value carbon matrix precursor. Porous carbon materials with high surface areas were usually derived from lignin by chemical activation but with a low degree of graphitization, which seriously reduced its electrochemical performance as energy storage material. In this work, the lignin-based carbon (LC) samples activated by different potassium compounds using EHL as a raw material were characterized by TG, EA, FT-IR, BET, TEM, XRD and Raman spectroscopy. The results showed that the influence of the four potassium compounds on the specific surface area (SSA) and pore volume of LC was as follows: K2CO3 > KOH > K2C2O4 > K3PO4. Interesting, we found that activator can improve the graphitization degree of LC, when the decomposition temperature of the activator is consistent with the activation temperature of lignin. In particular, K2CO3 can significantly improve the pore structure, surface area and graphitization degree simultaneously. Therefore, lignin-based carbon (LC-K2CO3-900) obtained by K2CO3 activation at 900 ℃ has more excellent electrochemical performance than that of other potassium compounds. LC-K2CO3-900 as the negative electrode of lithium ion battery can maintain a reversible capacity of 494 mAh g−1 after 200 cycles with a coulomb efficiency above 99% at a current density of 200 mA g−1. Even at 1000 mA g−1, it can still maintain a specific capacity of 260 mAh g−1. This porous carbon derived from low-cost renewable lignin sources is a good candidate for lithium ion battery electrode materials.