The invention belongs to the technical fields of organic synthesis and iron-ion detection and particularly relates to N-butyl-4-hydroxyl-1,8-naphthalimide-3-formaldehyde-(2-pyridine)hydrazone and an application. The preparation method comprises the following steps of: dissolving N-butyl-4-hydroxyl-1,8-naphthalimide-3-formaldehyde and 2-hydrazinopyridine into methanol, heating and refluxing, cooling till the reaction is ended, carrying out suction filtration, and washing with the methanol to obtain the N-butyl-4-hydroxyl-1,8-naphthalimide-3-formaldehyde-(2-pyridine)hydrazone. The invention alsoprovides a qualitative and quantitative detection method of Fe3+ by the N-butyl-4-hydroxyl-1,8-naphthalimide-3-formaldehyde-(2-pyridine)hydrazone and an application in realizing fluorescence imagingof Fe3+ in cells. The N-butyl-4-hydroxyl-1,8-naphthalimide-3-formaldehyde-(2-pyridine)hydrazone and the application have the beneficial effects that the synthesis method of the N-butyl-4-hydroxyl-1,8-naphthalimide-3-formaldehyde-(2-pyridine)hydrazone is simple; the N-butyl-4-hydroxyl-1,8-naphthalimide-3-formaldehyde-(2-pyridine)hydrazone is used for detection of Fe3+ as a fluorescence probe, the selection for Fe3+ is good, the interference of other coexisting positive ions can be avoided, the detection sensitivity is high, simultaneously the color is changed into light yellow from pink, the naked-eye recognition can be realized, the operation method is simple, the cost is low, and the fast and convenient effects are achieved; fluorescence imaging of Fe3+ can be realized in the cells, so that the potential application value is achieved in the aspect of sensor development.