Water pollution is one of the most pervasive problems afflicting people throughout the world, while adsorption is the most widely used method to remove the contaminants from water. Here, in this paper, we report an eco-friendly graphene oxide–chitosan (GO–CS) hydrogel as a new type of adsorbent for water purification. The GO–CS hydrogels were prepared via self-assembly of GO sheets and CS chains. A three-dimensional network composed of GO sheets crosslinked by CS was found in GO–CS hydrogels. The GO–CS composite hydrogels showed high adsorption capacity towards different contaminants, including cationic and anionic dyes, as well as heavy metal ions. The mechanism of the dye adsorption was investigated with a spectral method, and an electrostatic interaction was found to be the major interaction between ionic dyes and the hydrogel. The influence of the hydrogel composition on the adsorption capacity towards different adsorbates was also studied. Finally, it was demonstrated that the GO–CS hydrogel can be used as column packing, to fabricate a column for water purification by filtration.