A near-infrared ICT-based fluorescent probe LX was successfully obtained. LX which detection limit is low as 22.2 nm shows excellent selectivity and high sensitivity to diazane. LX can selectively detected diazane from other species over a wide pH (3–10) range. A obvious color change of solution from yellow to orange can be found, allowing the naked eye to detect. The sensing mechanism was reasonably detected by ESI-MS and DFT calculations. In addition, LX succeed in the visualization of diazane in living cells and the detection of diazane in water samples.