Photothermal therapy is promising for augmenting cancer therapeutic outcomes in cancer treatment. Diketopyrrolopyrrole (DPP)-conjugated polymer nanoparticles are in focus due to their dual photoacoustic imaging and photothermal therapy functions. Herein, the design and synthesis of three near-infrared absorbing conjugated polymers, named DPP-SO, DPP-SS and DPP-SSe, with heteroatom substitution of the thiophene moiety were developed for a photoacoustic imaging guided photothermal therapy. It was demonstrated that systematically changing only the heteroatom from O to S or Se could apparently adjust the absorption spectrum and energy gap of DPP-conjugated polymers to obtain the most suitable photothermal transduction agents (PTAs) for use in biomedicine. The characterization of photophysical properties proved that the photothermal conversion efficiency and absorption coefficient of DPP-SO nanoparticles under 808 nm irradiation was up to 79.3% and 66.51 L g-1 cm-1, respectively, which were much higher than those of DPP-SS and DPP-SSe nanoparticles. Remarkably, the IC50 value of DPP-SO for killing A549 cells was half that of DPP-SS and DPP-SSe nanoparticles. Further in vivo works demonstrated efficient photothermal therapeutic effects of DPP-SO nanoparticles with the guidance of photoacoustic imaging. Thus, this is an efficient method to regulate the photothermal performance of DPP-conjugated polymers by changing the heteroatom in the molecular skeleton.