Herein, macroporous carbon foams were successfully prepared with phenol and formaldehyde as carbon precursors and an ionic liquid, 1-butyl-3-methylimidazolium hexafluorophosphate (BMIPF6), as a pore generator by employing a polymerization-induced phase separation method. During the polycondensation reaction of phenol and formaldehyde, BMIPF6 forms a clustered structure which in turn yields macropores upon carbonization. The morphology, pore structure, electrical conductivity of carbon foams were investigated in terms of the amount of the ionic liquid. The as-prepared macroporous carbon foams had around 100-150 μm-sized pores. More importantly, the electrical conductivity of the carbon foams was linearly improved by the addition of BMIPF6. To the best of the author's knowledge, this is the first result reporting the possibility of the use of an ionic liquid to prepare porous carbon materials.