Rechargeable lithium-iodine (Li-I2) battery is a promising energy storage system because of the high energy and power density. However, the shuttle effects of iodine species and the unstable features of I2 block the practical applications of Li-I2 batteries. Herein, a dual heteroatom doped porous carbon cloth is fabricated as the host material for lithium iodide (LiI). Specifically, the self-standing nitrogen, phosphorus co-doped carbon cloth with high LiI loading exhibits a large specific capacity (221 mAhdg-1 at 1 C), excellent rate capability (95.8% capacity retention at 5 C) and superior long cycling stability (2, 000 cycles with a capacity retention of 96%). Electrochemical kinetic analysis confirms the dominant contribution of capacitive effects at high scan rates, which is responsible for the good high-rate performance. The improved electrochemical performance mainly stems from two unique features of nitrogen, phosphorus co-doped porous carbon cloth. Heteroatom doping provides extra active sites for strong adsorption of iodine species while the highly porous structure with large surface area favors the capacitive effects at high rates. This work provides a facile yet efficient approach to regulating both redox reaction and capacitive effects via adjusting surface composition and pore structure of carbon materials for enhanced battery performance.