Hierarchical porous carbons (HPC) were synthesized by a combination of self-assembly and chemical activation method. A mesoporous carbon with large-size pore was used as raw materials. N2sorption measurement indicated that plenty of micropores generated within the mesopore wall in the mesoporous carbon during KOH activation. Electrochemical impedance spectroscopy measurement demonstrated a high electrocatalytic activity of HPC electrode for triiodide reduction. The overall conversion efficiency of dye-sensitized solar cells with HPC counter electrode was 6.48%, which is similar to that of the device with conventional Pt counter electrode.