Nowadays, ionic liquids have attracted much attention due to their low melting point, wide liquid range, low vapor pressure, high thermal stability, high electrical conductivity, wide electrochemical window, designable structure, and affinity for many compounds. Ionic liquids have great potential in the field of carbon material preparation and modification. Ionic liquids can be directly used as a carbon source to prepare heteroatom-doped porous carbon materials by high-temperature carbonization; further, they can be used as a reaction medium and a porogen to convert biomass into porous carbon materials. In addition, ionic liquids can also be used for the modification of the porous carbon materials to prepare the carbon composite materials due to their good compatibility with the carbon materials. The ionic liquid-based carbon materials have considerable application value in the fields of electrocatalysis, supercapacitors, adsorption separation, biomedicine, and so on. Thus, in this paper, the latest research progress in the preparation and modification of ionic liquid-based carbon materials are summarized, with a focus on their applications in energy and environmental related fields.