The issue of water contaminants, which affects human and environmental health, is not trivial. It is thus paramount to find new cheap and user friendly ways to detect and remove them from the environment. Here, the synthesis of a green chitosan (CS) based molecularly imprinted membrane for the detection and quantification of 4‐nitrophenol (4‐NO2Ph) in aqueous media is proposed. The concentration of 4‐NO2Ph in a water solution was measured by HPLC analysis. CS as a functional polymer, 4‐NO2Ph as template, 4‐[(4‐hydroxy)phenylazo]benzenesulfonic acid as ligand, and glutaraldehyde as crosslinker in the presence of polyethylene glycol as porogen were used. The membrane was characterized by SEM and Fourier transform IR analyses, which confirmed the CS and polyethylene glycol backbone of the membrane. Kinetic studies of the detection system were performed by using pseudo‐first‐order and pseudo‐second‐order models. Then, the binding efficiency between 195.33 µmol L−1 and 9235.55 µmol L−1 of 4‐NO2Ph was evaluated, finding a maximum adsorption of 723.25 µmol 4‐NO2Ph per gram of membrane consistent with the Qmax calculated from the Langmuir isotherm. The selectivity of the membrane versus three phenolic competitor molecules, sharing very similar molecular structure to 4‐NO2Ph, was demonstrated. Finally, the applicability of the membrane to real‐world samples was evaluated, by using drinking water spiked with 7.19 µmol L−1 of 4‐NO2Ph, obtaining a removal efficiency of 70.6%. © 2017 Society of Chemical Industry