Preparation of a smart tool for simultaneous detection and removal of hypochlorite (ClO–) in water, a kind of serious persistent pollutant in industrial wastewater and even in tap water, is a puzzling issue in the chemosensing field. Here, halloysite nanotubes (HNTs), a natural product with excellent dispersibility in water, were employed as the scaffold to solve the urgent problem. The diaminomaleonitrile moiety, accompanying with the coumarin derivative as a chemosensor unit, was decorated on the surface of the HNTs. The diaminomaleonitrile group can be transferred into substituted imidazole formation and thereby triggers strong fluorescence emission upon ClO–, which triggers a dramatically “turn-on” fluorescence change and reduce ClO– into eco-friendly chloridion (Cl–). The detection and removal capacities show high selectivity over other commonly used ions. These results suggest that the smart nanocomposite can be used in the synchronous detection and removal of ClO– in water, which may pave a path in water quality monitoring and treatment.