From recent research, lignocellulosic materials assert themselves as good precursors for the manufacture of highly carbonaceous and porous materials. Hence, the perspective of this work is the preparation of the low-cost activated carbons (ACs) based on puck shells (
Afrostyrax lepidophyllus
) with a large surface area. To achieve this, chemical activation using phosphoric acid and sodium hydroxide as an activating agent was carried out. The response surface methodology through Box–Behnken design was used to optimize the preparation conditions. Box–Behnken design was used to optimize the preparation conditions. The factors whose influences have been studied are the concentration of activating agent (0.5–1.5 mol l
−1
), the carbonization temperature (300–500°C) and the residence time (30–100 min). The AC obtained by phosphoric acid was named CRP and impregnated with sodium hydroxide CRB. The ideal conditions for the preparation of the ACs obtained from the maximum iodine number (647.29 for CRP and 575.15 mg g
−1
for CRB) were: 1.5 mol l
−1
for the concentration of activating agent at a carbonization temperature of 500°C during 62 min for CRP and 0.85 mol l
−1
for the concentration of activating agent at a carbonization temperature of 500°C during 59 min for CRB. These two materials prepared were characterized by several techniques pH at the point of zero charge (pHpzc), Boehm titration, Fourier transform infrared spectroscopy, XRD analysis, BET method, Raman spectroscopy and scanning electron microscopy, which confirmed the acidic nature of CRP and the basic nature of CRB carbons. The specific surface of the micropores was 509.05 and 27.53 m
2
g
−1
, respectively. It provides a new valorization of agricultural waste for the preparation of effective-cost microporous ACs as an adsorbent that can be applied in water treatment industries.