To overcome the inferior rate capability and cycling performance of TiO2 nanomaterials as an anode material of lithium-ion batteries, we encapsulate TiO2 nanoparticles (P25) in carbon spheres through a facile pyrrole polymerization and carbonization. Material characterization demonstrates TiO2 nanoparticles are uniformly embedded in microporous amorphous carbon spheres, forming a watermelon-like structure. P25@C exhibits excellent high rate capability with average discharge capacity of 496, 416, 297, 240, 180, 99, 49 and 25 mAh g−1 at current rate of 0.5C, 1C, 5C, 10C, 20C, 50C, 100C and 200C, which shows superior long-term cycling performance with discharge capacity of 106.9 mAh g−1 at 20C after 5000 cycles. The capacity loss rate is only 0.008% per cycle. The outstanding lithium storage performance is ascribed to the watermelon-like composite structure, which remarkably improves electronic conductivity and structure stability of TiO2 nanoparticles. More importantly, the agglomeration of TiO2 nanoparticles is eliminated, and the entire surface of every TiO2 nanoparticle participates in the electrochemical reaction, which brings about an intense capacitive Li storage effect and leads to the high specific capacity and excellent rate capability of P25@C. This is confirmed through qualitative and quantitative analysis of the contributions from surface capacitive storage and bulk intercalation storage to the total capacity of the composite.