There has been much recent progress in the development of photothermal agents (PTAs) for biomedical and energy applications. Synthesis of organic PTAs typically involves noble metal catalysts and high temperatures. On the other hand, photochemical synthesis, as an alternative and green chemical technology, has obvious merits such as low cost, energy efficiency, and high yields. However, photochemical reactions have rarely been employed for the synthesis of PTAs. Herein, a facile and high-yield photochemical reaction is exploited for synthesizing nonplanar small molecules (NSMs) containing strong Michler's base donors and a tricyanoquinodimethane acceptor as high-performance PTAs. The synthesized NSMs show interesting photophysical properties including good absorption for photons of over 1000 nm wavelength, high near-infrared extinction coefficients, and excellent photothermal performance. Upon assembling the NSMs into nanoparticles (NSMN), they exhibit good biocompatibility, high photostability, and excellent photothermal conversion efficiency of 75%. Excited-state dynamic studies reveal that the NSMN has ultrafast nonradiative decay after photoexcitation. With these unique properties, the NSMN achieves efficient in vivo photoacoustic imaging and photothermal tumor ablation. This work demonstrates the superior potential of photochemical reactions for the synthesis of high-performance molecular PTAs.