One great challenge in the development of lithium ion batteries is to simultaneously achieve high power and large energy capacity at fast charge and discharge rates for several minutes to seconds. Here we show that nitrogen- or boron-doped graphene can be used as a promising anode for high-power and high-energy lithium ion batteries under high-rate charge and discharge conditions. The doped graphene shows a high reversible capacity of >1040 mAh g–1at a low rate of 50 mA g–1. More importantly, it can be quickly charged and discharged in a very short time of 1 h to several tens of seconds together with high-rate capability and excellent long-term cyclability. For example, a very high capacity of ～199 and 235 mAh g–1 was obtained for the N-doped graphene and B-doped graphene at 25 A g–1 (about 30 s to full charge). We believe that the unique two-dimensional structure, disordered surface morphology, heteroatomic defects, better electrode/electrolyte wettability, increased intersheet distance, improved electrical conductivity, and thermal stability of the doped graphene are beneficial to rapid surface Li+absorption and ultrafast Li+ diffusion and electron transport, and thus make the doped materials superior to those of pristine chemically derived graphene and other carbonaceous materials.