Silicon has a high-specific capacity as an anode material for Li-ion batteries, and much research has been focused on overcoming the poor cycling stability issue associated with its large volume changes during charging and discharging processes, mostly through nanostructured material design. Here we report incorporation of a conducting polymer hydrogel into Si-based anodes: the hydrogel is polymerized in-situ, resulting in a well-connected three-dimensional network structure consisting of Si nanoparticles conformally coated by the conducting polymer. Such a hierarchical hydrogel framework combines multiple advantageous features, including a continuous electrically conductive polyaniline network, binding with the Si surface through either the crosslinker hydrogen bonding with phytic acid or electrostatic interaction with the positively charged polymer, and porous space for volume expansion of Si particles. With this anode, we demonstrate a cycle life of 5,000 cycles with over 90% capacity retention at current density of 6.0 A g(-1).