Silicon nanoparticles are coated with the conductive polyaniline (PANI) using in situ polymerization method as anode materials to improve the electrochemical performance for lithium ion batteries. At first, the physicochemical and electrochemical properties of the doped polyaniline in the lithium ion electrolyte are investigated. After that, the effect of different contents of PANI for preparing Si/PANI composites on the composition and structure and thus the electrochemical performance are investigated. The structure and morphology of asprepared materials are characterized systematically by scanning electron microscopy (SEM), transmission electron microscopy (TEM), and X-ray diffraction (XRD). It is demonstrated that the silicon/polyaniline composite presents the core/shell structure. The Si/PANI composite with 12.3 wt% PANI exhibits the optimum electrochemical performance. The electrode still maintains better reversible capacity of 766.6 mAh g −1 , and the capacity retention of 72 % is retained after 50 cycles at current density of 2 A g −1 . The good electrochemical properties can be attributed to the PANI-coating layer, which can improve the electrical conductivity of the Si-based anode materials for lithium ion batteries and accommodate the volume change of silicon during the charge-discharge processes.