β-Galactosidase (β-gal) has emerged as a pivotal biomarker in primary ovarian cancer. Despite the existence of numerous fluorescent probes for β-gal activity detection, quinone methide-based immobilizing probes were shown to avoid rapid diffusion of the activated fluorophore and improve the resolution. However, the synthesis of these fluorophores, particularly near-infrared fluorophores, still exhibits lower efficiency. In this study, we introduce modular and rapidly assembled self-immobilizing fluorogenic probes, capitalizing on the proximity labeling properties of quinone methide (QM). Compared to conventional fluorescent probes, these new probes not only exhibit a fluorogenic response but also achieve permanent retention, demonstrating improved detection sensitivity, particularly after cell fixation and in vivo animal model studies. This straightforward synthesis approach holds promise for broader applications in detecting other analytes.