Terpyridine-attached phthalonitrile (Pn-TP) linked by cyanovinyl bond has been synthesized and employed for the preparation of subphthalocyanine (SubPc-TP) bearing conjugated terpyridine moieties. Both Pn-TP and SubPc-TP exhibited highly selective fluorescence turn-on in the presence of cyanide anions (CN-) based on chemodosimetric sensing mechanism. The conjugation of the Pn-TP molecule was interrupted by the addition of CN- at the cyanovinyl bond, showing the ratiometric fluorescence turn-on behavior. This sensing mechanism was further supported by density functional theory calculation and nuclear magnetic resonance titration studies. Optical and photophysical responses of SubPc-TP towards CN- were also investigated, in which similar fluorescence enhancement was observed due to the addition of CN- at the reactive boron trimer. The detection limit was estimated to be 94 nM, much below the World Health Organization-allowed level (1.9 μM) of CN- in water.