Functional groups on carbon substrates help to anchor conductive polymers through electrostatic interactions, but excessive groups are usually contradictory to the improvement of graphitization, which is closely relevant to the conductivity of electrodes. Herein, the balance between graphitization and oxygen-containing functional groups of carbon substrates was analyzed via adjusting the carbonization temperature (Tc) of carbon foams (CFs) and fabricating polypyrrole (PPy)/CFs free-standing electrodes. The graphitization of CFs is accompanied by the dissociation, migration and rearrangement of O atoms, resulting in structural changes of CFs at different Tc, which affects the morphology of PPy, as well as the adsorption and electron transfer between CFs and PPy. Besides, the increase of Tc improves the conductivity and rate capability of composite electrodes due to the graphitization enhancement of CFs. However, the accompanied reduction of functional groups results in the densification of PPy coatings, which causes the attenuation of specific capacitance and cycling stability of composite electrodes. In addition, PPy/CFs can show much better electrochemical performances than that of the pure PPy film, with a specific capacitance of 545.5F g−1 (1 A/g) and a 100% capacitance retention after 10,000 GCD cycles.