The present work investigates the effect of the type of carbon precursor on the adsorptive proficiency of as-prepared carbon nanomaterials (CNMs) for the removal of methylene blue dye (MB) from aqueous media. A comparison study was applied to assess the growth of CNMs from the decomposition of methane (CNMY1) and acetylene (CNMY2) using response surface methodology with central composite design (RSM/CCD). The produced nanomaterials were characterized using FESEM, EDX, TEM, BET surface area, Raman, TGA, FTIR, and zeta potential. The as-prepared adsorbent displayed different morphologies and under the experimental conditions, 10 mg of CNMY1 and CNMY2 was responsible for 97.7 % and 96.80% removal of dye. The maximum adsorptive uptake predicted by Langmuir isotherm was about 250 and 174 mg/g for CNMY1 and CNMY2, respectively. The as-synthesized carbon nanomaterial in this study could be explored as a great potential candidate for dye-bearing wastewater treatment.