Cancer cell precise fluorescence imaging and following tumor photothermal therapy have garnered ongoing interest. Lysosomes in cancer cells in a typical acidic environment can be used for smart bioimaging, and intelligent NIR-II fluorescence probes are attractive for tumor phototheranostics. Here, we successfully synthesized a pH-responsive NIR-II fluorescent dye FPZ and the introduction of N-methylpiperazine moiety at the ring position in the dye-endowed FPZ with fluorescence enhancement under acidic response. A pH-sensitive amphiphilic polypeptide was selected as the carrier to prepare FPZ-PN nanoparticles, which could be disassembled under acidic stimulation for efficient drug delivery and enrichment, and its fluorescence was significantly restored and enhanced (fluorescence enhancement of about 4.2 times) because of the blockage of the photoinduced electron transfer process, which allowed for efficient NIR-II fluorescence imaging, especially the lysosomes in cancer cells. In addition, the nanoparticles exhibited great photostability and a significant photothermal effect, with a photothermal conversion efficiency reaching as high as 69.96 % when subjected to a 1064 nm laser irradiation, which can effectively kill tumor cells. Thus, this work provides a new effective strategy for designing smart-responsive nanomedicine systems for precise localization and tumor elimination.