This study outlines a straightforward method for preparing polyaniline/ sulfation carboxymethyl cellulose /multi carbon nanotubes PANI/S-CMC/MWCNTs nanocomposite that is both cost-effective and environmentally beneficial. Using as-prepared PANI/S-CMC/MWCNTs nanocomposites, a modified glassy carbon electrode (GCE/ PANI/S-CMC/MWCNTs) was produced to accomplish very sensitive electrochemical detection of 2-nitrophenol (2-NP). To investigate the morphology and structure of the nanocomposite, researchers used X-ray diffraction, transmission electron microscopy, scanning electron microscopy, and Fourier-transform infrared spectroscopy, showing that the nanocomposite has excellent electrochemical performance. In the case of 2-NP, the differential pulse voltammetry experiment found that in the range of 2 to 80 µM (R2 = 0.934), there is a linear association between peak currents and concentrations. For 2-NP, the computed detection limit (S/N = 3) is 0.33 M, and limit of quantification for 2-NP is1.1µ M Furthermore, after correctly determining the target analytes in several water samples, the new sensor manifested a remarkable high recovery rate.