A sensitive platform for in vivo selective detection of the toxic element by a DNA stabilized biomolecule is of great importance. Particularly sensing of hydrazine in the presence of DNA is very important during cell damage and post-mortem. In this study, a new 9-O-(4-nitrobenzoyl) berberine analogue was designed and synthesized. The Calf thymus DNA (CT-DNA) binding affinity studies revealed that the analogue was excellent DNA binding efficacy with groove binding mode (K= 4.2 × 106 M−1) compared to parent berberine (K= 2.2 ×105 M−1). Importantly, our synthesized analogue for the first time a berberine analogue that can effectively use as a selective ratiometric colorimetric probe for hydrazine detection based on ICT (intramolecular charge transfer) mechanism with a good limit of detection (20nM) which is much below the threshold limiting value (TLV) of hydrazine (10 ppb or 312 nM) as regulated by Environmental protection agency (EPA). Interestingly, we report a new avenue in sensing study in the presence of DNA i. e. our DNA groove binding analogue (at maximum saturation) also can serve as a promising turn on fluorimetric sensor for hydrazine detection with high selectivity over biologically abundant amines and metal cations with well limit of detection (LOD) value (14 nM). The sensing mechanism in the absence of DNA and in the presence of DNA was established by different spectroscopic methods. In addition, the berberine analogue could also be utilized for qualitative detection of hydrazine in the vapor phase and for the imaging of hydrazine in living Michigan Cancer Foundation-7 (MCF-7) cells. © 2017 Wiley-VCH Verlag GmbH & Co. KGaA, Weinheim