The incidence of cancer has escalated at a distressing pace, creating an urgent demand for advancements and breakthroughs in medical interventions. Amidst the multitude of approaches for diagnosing and managing cancer, fluorescence imaging, photodynamic therapy, and photothermal therapy have emerged as key approaches due to their unique advantages. Herein, two new xanthene-based probes, namely, JB-1 and JB-2, with D-π-A conjugated structures, are reported. JB-1 and JB-2 each feature electron-donating and electron-accepting groups attached to tetraphenylethene or triphenylamine conjugate skeletons, respectively. The restriction of intramolecular rotation in JB-1 results in an absorption wavelength greater than 638 nm and strong emission at the first near-infrared window at 750 nm, with a 117 nm red-shift compared to ICG. In contrast, JB-2 exhibits an emission peak at 971 nm in the second near-infrared region, with an absorption beyond 691 nm. JB-2 also features a fluorescent shoulder peak at 1204 nm, offering a superior resolution for in vivo bioimaging. Furthermore, JB-2 demonstrates excellent photothermal and photodynamic effects for both in vitro and in vivo cancer therapy. This study highlights the potential for designing multifunctional xanthene dyes for dual-mode cancer treatment and bioimaging.