Cancer possesses normoxic and hypoxia microenvironments with different levels of oxygen, needing different efficacies of photothermal and photodynamic therapies. It is important to precisely tune the photothermal and photodynamic effects of phototherapy nano‐agents for efficient cancer treatment. Now, a series of copolymeric nanoparticles (PPy‐Te NPs) were synthesized in situ by controlled oxidative copolymerization with different ratios of pyrrole to tellurophene by FeCl3. The photothermal and photodynamic effects of semiconducting nano‐agents under the first near‐infrared (NIR) irradiation were precisely and systematically tuned upon simply varying the molar ratio of the pyrrole to tellurophene. The PPy‐Te NPs were used for cancer treatment in mice, exhibiting excellent biocompatibility and therapeutic effect. This work presents a simple method to tune photothermal and photodynamic therapies effect in semiconducting nano‐agents for cancer treatment.