Micro‐ and mesoporous activated carbons (ACs) with ultrahigh surface area were synthesized from sunflower seed shells (SSS) by carbonization followed by KOH activation. The effects of citric acid (CA) in both carbonization and activation and of sodium chloride (NaCl) in the activation step were evaluated through the response surface method. Na atoms produced during activation can diffuse in the carbon texture and intensify the role of K atoms in expanding and creating new microporosity, whereas its combination with CA results in a significant proportion of mesopores. CA sequestrates metal ions and facilitates the decomposition of lignocellulosics, which prevents the formation of heavy tar blocking the pores. A high capacity for CO2 adsorption was also observed for the NaCl‐activated sample which was higher than that reported previously.