The invention provides a 7-nitro-1,2,3-benzoxadiazole (NBD) derivative and a synthesis method and application thereof, and belongs to the field of detection of NBD derivatives and mercury ions. The synthesis method of the NBD derivatives comprises the following steps of: first, dissolving 4-chlorine-7-nitrobenzo-1,2,3-benzoxadiazole and anhydrous piperazine in 2-methoxyethanol, heating and refluxing, and separating by column chromatography to obtain a compound 1; then, heating and refluxing 2,6-bis (chloromethyl) pyridine and 8-hydroxyquinoline in an acetone solution, and separating by the column chromatography to obtain a compound 2; finally, dissolving the compound 1 and the compound 2 in acetonitrile, refluxing for 12 hours, and separating by the column chromatography to obtain the product NBD derivative. The invention also provides a method for detecting the mercury ions, which comprises the step of quantitatively detecting the content of Hg<2+> in a solution of all water (pH = 7.4) by using the NBD derivative as a probe. The detection method can detect the mercury ions in an aqueous solution with high selectivity and sensitivity, and is simple, convenient and rapid to operate.Meanwhile, test paper for detecting the mercury ions is provided, so that the Hg<2+> detection is more convenient.