Nitroxyl (HNO) plays a vital role in various biological functions and pharmacological activities, so the development of an excellent near-infrared fluorescent (NIRF) and photoacoustic (PA) dual-modality probe is crucial for understanding HNO-related physiological and pathological progression. Herein, we proposed and synthesized a novel NIRF/PA dual probe (QL-HNO) by substituting an indole with quinolinium in hemicyanine for the sensitive detection of exogenous and endogenous HNO in vivo. The designed probe showed the highest sensitivity in NIRF mode and a desirable PA signal-to-noise ratio for HNO detection in vitro and was further applied for NIRF/PA dual-modal imaging of HNO with high contrast in living cells and tumor-bearing animals. Based on the excellent performance of QL-HNO, we believe that this study provides a promising molecular tool for further understanding of HNO-related physiological and pathological progression.