Substitution reactions in carbocyanine dyes are used to determine nucleophilic compounds. The interaction of a chlorine-containing carbocyanine with a number of medicinal substances has been studied. It was shown that in the reaction with isoniazid in the presence of surfactants, this dye selectively changes color from yellow-green to purple. Chromatography-mass spectrometry has proven the formation of the substitution product of chlorine with isoniazid. The reaction occurs within 20 minutes in the presence of 1 mM cetyltrimethylammonium bromide. The detection limit of isoniazid in water by photometric method was 10 µg/mL; in diluted artificial urine using fluorimetry, it was 0.3 µg/mL. The method does not require full-spectrum equipment, which simplifies the determination.