The excellent properties of the polyelectrolyte complex hydrogels (PECHs) prepared with polysaccharides only, including polyampholyte, low toxicity, green, and clean production, have endowed them great application potentials as the adsorbents for dye‐containing wastewater treatments. In the current study, the PECH of chitosan (CTS) and carboxymethylcellulose (CMC) was prepared by semi‐dissolution acidification sol–gel transition (SD‐A‐SGT) method. The hydrogel was formed by the strong electrostatic interaction of cationic NH3+ groups of CTS and the anionic COO− groups of CMC. This simple but efficient means exhibited great potentials in constructing PECHs with uniform composition and controllable sol–gel transitions. Molecular dynamics simulation was first employed to predict the formation process and the microstructure of PECHs prepared by SD‐A‐SGT method. The structure and properties of the CTS‐CMC PECHs were also characterized by Fourier transform infrared spectroscopy, SS 13C‐NMR, scanning electron microscopy, mechanical tests, and rheological measurements, respectively. Taking the advantage of amphoteric polyelectrolyte properties, adsorption properties of anionic and cationic dyes were investigated using sunset yellow FCF and methylene blue as model dyes, respectively. The PECHs prepared in the present work had good adsorption capacity for both cationic and anionic dyes with maximum adsorption capacity of 212.83 mg/g for sunset yellow FCF and 167.35 mg/g for methylene blue. Therefore, this PECH would be a promising environmentally friendly adsorbent for the treatment of functional molecules with different charges.