A series of carbon aerogels were synthesized by polycondensation of resorcinol and formaldehyde using cetyltrimethyl ammonium bromide (CTAB) as a catalyst. The structure and properties of carbon aerogels were characterized by X‐ray diffraction (XRD), Raman, scanning electron microscope (SEM), Fourier transform infrared spectroscopy (FT‐IR), and N2 adsorption‐desorption technologies. Besides, the CO2 capture behavior of carbon aerogels was also investigated. It was found that the amount of CTAB affected the structure and morphology of carbon aerogels, thus influenced the CO2 adsorption behavior. The sample CA‐125 (the ratio of resorcinol and CTAB is 125) had the highest CO2 adsorption capacity (63.71 cm3·g–1 at 1 bar and 24.14 cm3·g–1 at 0.15 bar) at 25 °C. In addition, the higher CO2 adsorption capacity was ascribed to the higher surface area, pore volume and appropriate pore size, as well as the more defects over carbon aerogels.