Developing activatable near-infrared (NIR) probes to specifically monitor and visualize the activities of cancer-related enzymes is highly significant yet challenging in early cancer diagnosis. Taking advantage of the unique photophysical characteristics of aggregation-induced emission (AIE) fluorophores, here we design and synthesize a novel activatable probe QMTP by conjugating an AIE fluorophore quinolone-malononitrile to a hydrophilic phosphate-modified phenol group. The probe was initially non-fluorescent in aqueous solution due to its good water solubility, but was readily activated to generate a strong NIR fluorescence upon treatment with alkaline phosphatase (ALP), which enables specific detection of ALP activity. Furthermore, we have employed QMTP to monitor and spatially map the activity of endogenous ALP both in cancer cells and in drug-treated zebrafish larvae. The experimental results reveal that the QMTP probe has great specificity and sensitivity for ALP detection. We thus believe that our work offers a promising tool for accurate detection of ALP-associated diseases in preclinical applications.