A high-performance turn-off fluorescent chemosensor MSAP was developed for the selective sensing of cyanide anion without any interferences from other competing anions. MSAP's spectral responses to cyanide anion have been investigated by UV–vis and fluorescence spectroscopy. The limit of detection of cyanide anion was about 2.8 μM, which is much less than the WHO acceptable threshold level. The binding stoichiometry between the MSAP and cyanide anion was about 1:1, which was well augmented by Job`s plot. The quenching constant between MSAP and CN− ion calculated from the Stern-Volmer equation was about 8.7351×104M−1. The proposed detection mechanism of MSAP for the sensing of cyanide anion was further demonstrated by 1H NMR titration, ESI-MS and by density functional theory (DFT) studies. At last, probe MSAP was fruitfully exploited to analyse the presence of cyanide ion in diverse food samples and a XOR molecular logic gate was fabricated.