The invention relates to a near-infrared light stimulation response type functional macromolecule, an intelligent nanometer material and a preparation method of the intelligent nanometer material, belonging to a photo-thermal macromolecule, two synthesis methods and the preparation method of the nanometer material taking the photo-thermal macromolecule as a raw material. A piperidine-thiophene-croconic acid-thiophene-piperidine conjugated element is used as a main component, and a plurality of groups are used for modifying the photo-thermal macromolecule, so the overall properties of the macromolecule are regulated and controlled. A solvent replacement method and a self-nucleation method are adopted, and different solvent systems and temperatures are controlled, so various novel photo-thermal nanometer materials with various morphologies such as a spherical shape, a fibrous shape and a sheet shape are prepared. Structural parameters such as morphology, size and the like of the nanometer material can be effectively regulated and controlled through different photo-thermal macromolecule substituent elements, and the nanometer material has good biocompatibility and excellent photo-thermal performance. In the future, the nanometer material is expected to be applied to photothermal therapy, photodynamic therapy, photoacoustic imaging and the like in the field of biomedicine, and haspotential application value.