An aldehyde-containing diarylethene parent react with the benzothiazole acetonitrile which results in a photochromic aggregation-induced emission enhancement (AIEE) molecule. The title compound emits bright yellow fluorescence (λem = 578 nm) in the solid state, which is contrast to many diarylethene derivatives having serious aggregation-caused quenching (ACQ). Further studies showed the title compound as colorimetric and fluorescent sensing cyanide sensor based on nucleophilic addition reaction with rapid response, excellent selectivity, and high sensitivity. Moreover, practical applications studied showed the title compound is convenient to detect for cyanide ion in food and actual water samples.