A new type of magnetic chitosan nanocomposites modified with graphene oxide and polyethyleneimine (MCS/GO-PEI) was synthesized, which was used as an adsorbent to remove the toxic heavy metals of As and Hg as well as anionic azo dyes of congo red and amaranth in environmental water. In this experiment, MCS/GO-PEI was first synthesized and the structure and morphology characterized by scanning electron microscopy (SEM), transmission electron microscopy (TEM), Fourier-transform infrared spectrometry (FT-IR), X-ray diffractometer (XRD), vibrating sample magnetometry (VSM) and X-ray photoelectron spectroscopy (XPS). The adsorption performance of the material for four analytes was investigated through adsorption experiments. The kinetic and isothermal results showed that the adsorption process was well described by pseudo-second-order kinetic and Langmuir isotherm model. Besides, the important parameter pH in the adsorption process was investigated and optimized. The maximum adsorption capacities of the nanocomposites for arsenic, mercury ions, congo red, amaranth were 220.26, 124.84, 162.07, 93.81 mg g−1 under optimum adsorption conditions, respectively. The adsorption-desorption showed that the adsorbents were presented adequate reusability. The as-prepared MCS/GO-PEI nanocomposite could serve as promising adsorbent for arsenic, mercury, congo red and amaranth in environmental water samples treatment technology.