We present an intelligent photothermal therapy agents by functionalizing gold nanoparticles with specific nucleic acid sequences. Hairpin nucleic acids are modified to the nanoparticles, forming AuNPs-1 and AuNPs-2. Upon infiltrating cancer cells, these nanoparticles undergo catalytic hairpin assembly (CHA) in the presence of target miRNA, leading to aggregation and subsequent photothermal conversion. Under near-infrared laser irradiation, aggregated gold nanoparticles exhibit efficient photothermal conversion, selectively damaging cancer cells. This approach offers heightened selectivity, as nanoparticles only aggregate in environments with cancer biomarkers present, sparing normal cells. Cytotoxicity assays confirm minimal toxicity to normal cells. In vivo studies on mice bearing solid tumors validate the system's efficacy in tumor regression. Overall, this study highlights the potential of nucleic acid-functionalized gold nanoparticles in intelligent and selective cancer photothermal therapy, offering insights for targeted diagnosis and treatment development.