Due to the aggregation-caused quenching effect and near-infrared I poor penetration capabilities of common fluorescent molecules, their applications in visualized imaging and photoactivated treatment are limited. Therefore, new near-infrared II (NIR-II) molecule (named TST), which had the abilities of aggregation-induced emission (AIE) and photothermal therapy are synthesized. Moreover, in order to further improve its fluorescent yield and therapeutic effect, camptothecin prodrug (CPT-S-PEG) and novel immune checkpoint inhibitor AZD4635 are used to co-assemble with TST into nanoparticles for drug delivery. On account of the strong interaction of camptothecin and TST, the intramolecular rotation of TST is limited, thereby inhibiting non-radiation attenuation and promoting fluorescence generation when the nanoparticles are intact. As nanoparticles uptake by cancer cells, redox sensitive CPT-S-PEG is degraded and the nanoparticles disintegrate. The released TST enhances non-radiative attenuation and expedites photothermal conversion because of the removal of the constraint of camptothecin. Furthermore, photothermal therapy induces immunogenic cell death of cancer cells and releases abundant ATP into the tumor microenvironment to recruit immune cells. However, superfluous ATP is converted into immunosuppressive adenosine through the CD39-CD73-A2AR pathway. The AZD4635 released by photothermal disintegration of the nanoparticles just blocks this pathway timely, achieving favorable synergistic effect of photothermal therapy, chemotherapy, and immunotherapy.