Three-dimensionally ordered macroporous (3DOM) carbons having walls composed of mesosized spherical pores were prepared by a colloidal crystal templating method. A composite electrode consisting of bimodal porous carbon and polyaniline (PAn) was prepared by electropolymerization of aniline within the macropores of the bimodal porous carbon. It was found that the deposition of PAn decreased the porosity and specific surface area (SSA) of the electrode. The electrochemical properties of the composite electrode were characterized in a mixed solution of ethylene carbonate (EC) and diethyl carbonate (DEC) containing 1moldm−3 LiPF6. The discharge capacity of the carbon–PAn composite electrode was 111mAhgcarbon–PAn −1 in the potential range of 2.0–4.0V vs. Li/Li+, which corresponded to a volumetric discharge capacity of 53mAhcm−3. Both the double-layer capacity (30mAhg−1) and the redox capacity of PAn (81mAhg−1) contributed to the discharge capacity of the composite electrode. The carbon–PAn composite showed good rate capability, and the discharge capacity at a high current density of 6.0Ag−1 was as high as 81mAhg−1.