A carboxymethyl cellulose (CMC)/polyethyleneimine (PEI) hybrid hydrogel was successfully prepared under green processing conditions. The CMC and PEI formed a polyelectrolyte complex, and the three-dimensional (3D) network structure was hardened by chemical crosslinking, resulting in suitable hydrogel properties. In the prepared CMC/PEI polyelectrolyte hydrogel, the surface charge was easily switched according to the pH change, and the resulting swelling and contraction was reversible. The pH sensitivity of the CMC/PEI hydrogel was effective in removing ionic dye contaminants, and as a result, it showed an excellent removal capacity of 319 mg/g for anionic acid orange (AO) and 129 mg/g for cationic methylene blue (MB). In addition, the CMC/PEI polyelectrolyte hydrogel maintained structural stability despite repeated changes in surface charge characteristics and shrinkage-swelling due to repeated pH conversion. As a result, in the reuse process through repeated adsorption and desorption, it showed an excellent reuse efficiency of more than 93% even after 10 reuse cycles.