The invention provides a spiropyran-naphthalimide derivative and its synthesis method and application, the Chinese name of the derivative is N-(2-(6-azido-1,3-dioxo ‑1H‑benzo[de]isoquinoline‑2(3H)‑yl)ethyl)‑3‑(3',3'‑dimethyl‑6‑nitrospiro[chromene‑2,2'‑ Dihydroindoline]‑1'‑yl) propionamide, the English name is N‑(2‑(6‑azido‑1,3‑dioxo‑1H‑benzo[de]isoquinolin‑2(3H)‑yl)ethyl) ‑3‑(3',3'‑dimethyl‑6‑nitrospiro[chromene‑2,2'‑indolin]‑1'‑yl)propanamide, named NSP, which can be converted to its isomer by UV irradiation Bulk NMR. Assay method is in PBS‑C pH 7.4 2 h 5 In the buffer solution of OH (1:1, v / v), the contents of hydrogen sulfide and sulfur dioxide were quantitatively detected by fluorescence spectrophotometer, respectively. The detection process is simple, sensitive and fast, and the detection result is accurate.