In virtue of abundant sodium resources, sodium ion batteries (SIBs) have been regarded as one of the most promising alternatives for large-scale energy storage applications. However, the absence of a suitable anode material makes it difficult to realize these applications. Here, we demonstrate an effective synthesis strategy of using a “microreactor” consisting of melamine fiber (inside) and graphene oxide (GO, outside) to fabricate three dimensional (3D) nitrogen doped (N-doped) graphene as high-performance anode materials for sodium ion batteries. Through a controlled pyrolysis, the inside melamine fiber and the outside GO layer has been converted into N-doped graphene and reduced graphene oxide (r-GO) respectively, and thus the “microreactor” is transformed into interconnected 3D N-doped graphene structures. Such highly desired 3D graphene structures show reversible sodium storage capacities up to ∼305 mA h g−1 after 500 cycles at a current density of 0.2 A g−1 and promising long cycling stability with a stable capacity of ∼198 mA h g−1 at 5 A g−1 after 5000 cycles. The high capacity and superior durability in combination with the facile synthesis procedure of the 3D graphene structure make it a promising anode material for SIBs and other energy storage applications.