Heteroatom-doped carbon is an attractive material for anodes in lithium-/sodium-ion batteries as a replacement for traditional graphite anodes. However, the complex fabrication process and high cost limit practical applications of these carbon materials. Here, we report a low-cost, natural potassium-doped carbon material, which is directly carbonized from the coconut endocarp-a kind of high potassium-containing biomass material. The obtained carbon structure features an expanded d(002)-spacing (0.4 nm) originating from the superhigh potassium content (6654 mg kg-1). Because of the improvement on charge transfer kinetics and electrical properties, the potassium-doped carbon anode exhibits promising electrochemical performance in sodium-ion batteries, including high initial reversible capacity (314 mAh g-1) and good cycle stability (289 mAh g-1 after 200 cycles). Additionally, this work opens up a new approach for the design of heteroatom-doped carbon materials from the viewpoint of being naturally environmental friendly.