Carbonaceous materials are one of the most promising anode materials for sodium-ion batteries, because of their abundance, stability, and safe usage. However, the practical application of carbon materials is hindered by poor specific capacity and low initial Coulombic efficiency. The design of porous structure and doping with heteroatoms are two simple and effective methods to promote the sodium storage performance. Herein, the N, P co-doped porous carbon materials are fabricated using renewable and biodegradable gelatin as carbon and nitrogen resource, phosphoric acid as phosphorus precursor and polystyrene nanospheres as a template. The product can deliver a reversible capacity of 230 mA h g-1 at a current density of 0.2 A g-1 , and even a high capacity of 113 mA h g-1 at 10 Ag-1 . The enhanced sodium storage performance is attributed to the synergistic effect of the porosity and the dual-doping of nitrogen and phosphorus.