A novel fluorescent sensor on the basis of diarylethene and benzohydrazide unit was successfully synthesized. Its photochromic and fluorescent switching properties have been studied in detail by the irradiation of UV‐visible (UV‐Vis) lights and the stimulus of Zn2+/EDTA. The sensor exhibited high sensitivity and selectivity toward Zn2+ in tetrahydrofuran, which is not interfered by other cations, especially of congener Cd2+. The fluorescence intensity enhanced 84 times along with a 44‐nm blue shift of the emission peak after adding Zn2+. The stoichiometric ratio between the sensor and Zn2+ was 1:1, and the limit of detection (LOD) was calculated as 5.60 × 10−9 mol L−1. Besides, the sensor was applied in the detection of practical water samples with high accuracy.