Carbon materials have been widely applied in the energy storage devices, however, the preparation of suitable carbon materials for sodium-ion batteries (SIBs) is still a challenge. In this paper, N-doped porous carbon material (NDPCs) with rose-like structure has been successfully prapared through pyrolysis of the as-prepared polyimides in-situ. The NDPCs shows rose-like structure derived from 2D nanosheets, an expanded interlayer distance of 0.387nm, a high specific surface area of 215.7m2 g−1 and the electrochemical performances for Na-ion batteries are systematically investigated. A high reversible specific capacity of 240mAhg−1 at a current density of 100mAg−1 is attained and a specific capacity of 224mAhg−1 is remained even after 100 cycles. Remarkably, even at a high current density of 3.2Ag−1, the reversible specific capacity of 104mAhg−1 can be observed. This excellent performance of NDPCs electrode may be ascribed to its superior structure, since the micropore/mesopore might efficiently shorten the diffusion distance of Na-ion and the enlarged interlayer spacing of 0.38nm is significant for Na-ion insertion/extraction. Significantly, the approach to prepare carbon materials from PI may be generalized to other polymers.