Certainly water pollution control will play a key role in environmental health. Therefore, researchers are attempting to reduce the ecological effects of water pollution by creating restrictions in the use of chemicals or water reuse. Among all the available techniques, adsorption method attracted much attention due to the higher efficiency, cost-effectiveness and simplicity. So, in this work, novel biodegradable hydrogel based on carboxymethyl cellulose (CMC) and polyaniline (PANI) was introduced to remove toxic dyes from wastewater. The synthesis process was accomplished in two steps: free radical polymerization of acrylic acid (AA) on the CMC (0.25 g) in the presence of ammonium per sulfate (APS) as radical initiator (0.2 g) and N,N-methylene-bisacrylamide (MBA) as crosslinker (0.1 g) at 70 ◦C, and after 30 min, growing PANI chains on the synthesized CMC-PAA hydrogel by radical polymerization of aniline (1.0 mL) in acidic condition (20 mL of hydrochloric acid 1.0 M) to form macro-porous conductive hydrogel (CMC-PAA-PANI). The resulted hydrogel showed high antibacterial activity and excellent biodegradability by natural soil microorganisms with decomposition to 91.7 %. Also, the final hydrogel exhibited reasonable conductivity and pH sensitivity properties.