Herein, we developed a dual-channel and light-up near-infrared fluorescent probe for ratiometric sensing of β-galactosidase (β-gal) activity. The well-designed probe, which shows ratiometric optical response with a significant red-shift (from 575 nm to 730 nm), was successfully applied to detect endogenous β-gal activity in SKOV-3 cells and tumor-bearing mice.