A highly colorimetric and fluorimetric chemosensor, 3-oxo-[1,4]-benzothiazin-2-ylidene acetohydrazide (L2) is reported for the mercury detection. In HEPES-buffered solution (CH3CN: H2O, 1:2, v/v, pH 7.2), L2 showed a characteristic absorption peak at 340 nm, after addition of Hg2+ induces color change from light yellow to purple with significantly enhancement in absorbance at 340 nm and a new band centered at 550 nm with red-shift of 110 nm. Furthermore, the L2 exhibited high sensitivity and selectivity overall emission change of more than 100-fold fluorescence intensity enhancement towards Hg2+ ion with a 1:1 binding stoichiometry (1.938 × 103 M−1 binding constant within detection limit as low as 5.4 × 10−8 M) in water samples. Apart from this, theoretical elucidation of the experimental outcome has also been supported by applying density functional theory (DFT) to the ligand and the complex. In situ, the solution of L2 + Hg2+ complex displayed high reversibility by I− through Hg2+ displacement approach. This reversibility in fluorescence suggested that the promising applicability of chemosensor as “off–on–off” naked eye sensor and practical applicability of L2 as an INHIBIT logic gate based on the emission changes with the inputs of Hg2+ and I− was investigated.