Recent studies of lithium ion batteries focus on improving electrochemical performance of electrode materials and/or lowering cost. Doping of active materials with heteroatoms is one promising method. This paper reviews the effects of heteroatoms on anode materials such as carbon- and tin-based materials, and cathode materials such as LiCoO2, LiNiO2, LiMn2O4 and V2O5. There are favorable and unfavorable effects, which depend on the species and physicochemical states of heteroatoms and the parent electrode materials. In the application of lithium ion batteries advantageous factors should be exploited, unwelcome side effects should be avoided as far as possible. Considerable gains towards improved electrochemical performance of the electrode materials have been achieved. Nevertheless, there are still problems needing further investigation including theoretical aspects, which will in the meanwhile stimulate the investigation for better electrode materials.