Chitosan (Ch) is a polysaccharide obtained from chitin: a renewable, nontoxic, biocompatible biomolecule that constitutes the second most abundant natural polymer on the planet. The presence of amino groups in the chitosan polymer chains allows one to change the physicochemical properties of the natural polymer. In this work, we prepared a chitosan derivative (ChMM) with ethoxymethylenemalononitrile (EMM) through a nucleophilic vinylic substitution (SNV), changing the experimental conditions of stoichiometry, solvent (ethanol, dimethylsulfoxide (DMSO)) and reaction time (3 and 6 h). ChMM was characterized by Fourier transform infrared spectroscopy (FTIR), solid‐state 13C NMR, elemental analysis (EA), thermogravimetry (TG), scanning electron microscopy (SEM) and X‐ray diffraction (XRD). The FTIR and 13C NMR results confirm the success of the reaction, showing a sharp peak at 2213 cm−1 corresponding to the stretching of the C–N bond and additional signals at 52 and 166 ppm, respectively. The degree of substitution (DS) was calculated from EA and the results obtained show that sample modified with a [Ch]/[EMM] molar ratio of 1:2 over 3 h in DMSO presented the better result (DS = 0.91). ChMM did not show a considerable change in morphology (SEM) and thermal stability (TG). The insertion of methylenemalononitrile groups led to a decrease in the crystallinity index of chitosan derivatives (XRD). ChMM showed good ability to remove dyes in acidic and basic media (pH 5, 7, 9), and for crystal violet and safranin dyes the removal percentage surpassed 70%. © 2022 Society of Industrial Chemistry.