An advanced architecture design of nitrogen-doped TiO2 anchored on nitrogen-doped 3D graphene framework composites (denoted as N-TiO2/N-3D GFs) have been fabricated by a facile template process and further NH3 treatment. The 3D graphene framework allows the electrolyte to penetrate into the inverse opal structure, and possesses high electronic conductivity. The close contact between the N-TiO2 and the graphene suppresses the growth and aggregation of TiO2 nanoparticles during heating process, leading to decreased Li+ diffusion length. The N-doping in both TiO2 and the graphene matrix could improve the electronic conductivity on the TiO2 particle surface and between adjacent particles. As expected, when used as an anode for Li-ion batteries (LIBs), the N-TiO2/N-3D GFs composite delivers an excellent reversible capacity of 165 mA h g−1 after 200 cycles at 100 mA g−1 and an outstanding rate capability of 114 mA h g−1 after 1000 cycles at 1 Ag−1. With rational design, this strategy could be extended to other electrode materials that may hold great promise for the development of high energy storage systems.