Bacterial keratitis, an ocular emergency, is the predominant cause of infectious keratitis. However, diagnostic procedures for it are invasive, time-consuming, and expeditious, thereby limiting effective treatment for the disease in the clinic. It is imperative to develop a timely and convenient method for the noninvasive diagnosis of bacterial keratitis. Fluorescence imaging is a convenient and noninvasive diagnostic method with high sensitivity. In this study, a type of nitroreductase-responsive probe (NTRP), which responds to nitroreductase to generate fluorescence signals, was developed as an activatable fluorescent probe for the imaging diagnosis of bacterial keratitis. Imaging experiments both in vitro and in vivo demonstrated that the probe exhibited "turn-on" fluorescence signals in response to nitroreductase-secreting bacteria within 10 min. Furthermore, the fluorescence intensity reached its highest at 4 or 6 h in vitro and at 30 min in vivo when the excitation wavelength was set at 520 nm. Therefore, the NTRP has the potential to serve as a feasible agent for the rapid and noninvasive in situ fluorescence diagnosis of bacterial keratitis.