Cellulose nanofibers decorated with SiO2 nanoparticles (SiO2-CNF) were prepared by the extraction of cellulose nanofibers from Yucca leaves, followed by modification with SiO2 nanoparticles, and used as efficient materials for the removal of both anionic and cationic dyes from the aqueous solution. Prepared nanostructures were characterized using Fourier transform infrared spectroscopy (FT-IR), X-ray diffraction powder (XRD), Thermogravimetric analysis (TGA), scanning electron microscopy (SEM), energy dispersive X-ray (EDX), and transmission electron microscopy (TEM) analysis. The adsorption capacity of the nanostructures was investigated for the removal of both cationic (Methylene Blue, MB, and Crystal Violet, CV) and anionic (Eriochrome Black-T, EB) dyes. The kinetics of adsorption were investigated using some well-known models, including intraparticular diffusion (IPD), pseudo-first-order (PFO), pseudo-second-order (PSO), and Elovich. The adsorption isotherms were also explored using the Langmuir, Freundlich, Temkin, and Redlich-Peterson models. The obtained results revealed that the adsorption processes follow PSO kinetic and Langmuir isotherm models. Thermodynamic parameters of the adsorption were measured at different temperatures, indicating the feasibility and spontaneity of the adsorption. The pH and salt effects on adsorption were also explored. Finally, according to the reusability tests, the prepared adsorbents showed high recoverability without considerable loss in adsorption efficiency after five repeated runs.