Background: Near-infrared cyanine dyes have high sensitivity and spatial resolution imaging capabilities, but they also have unavoidable drawbacks such as photobleaching, low water solubility, fluorescence quenching, and toxic side effects. As an effective biologic drug carrier, albumin combines with cyanine dyes to form albumin@dye nanoparticles. These nanoparticles can alleviate the aforementioned issues and are widely used in tumor imaging and photothermal therapy. Methods: Herein, a newly synthesized near-infrared dye IR-817 was combined with bovine serum albumin (BSA) to create BSA@IR-817 nanoparticles. Through the detection of fluorescence emission and absorption, the optimal concentration and ratio of BSA and IR-817 were determined. Subsequently, dynamic light scattering (DLS) measurements and scanning electron microscopy (SEM) were used for the physical characterization of the BSA@IR-817 nanoparticles. Finally, in vitro and in vivo experiments were conducted to assess the fluorescence imaging and photothermal therapeutic potential of BSA@IR-817 nanoparticles. Results: IR-817 was adsorbed onto the BSA carrier by covalent conjugation and supramolecular encapsulation, resulting in the formation of dispersed, homogeneous, and stable nanoparticles with a particle size range of 120-220 nm. BSA@IR-817 not only improved the poor water solubility, fluorescence quenching, and toxic side effects of IR-817 but also enhanced the absorption and fluorescence emission peaks in the near-infrared region, as well as the fluorescence in the visible spectrum. In addition, BSA@IR-817 combined with laser 808 irradiation was able to convert light energy into heat energy with temperatures exceeding 50 °C. By creating a mouse model of subcutaneous melanoma, it was discovered that the tumor inhibition rate of BSA@IR-817 was greater than 99% after laser irradiation and that it achieved nearly complete tumor ablation without causing significant toxicity. Conclusion: Our research, therefore, proposes the use of safe and effective photothermal nanoparticles for the imaging, diagnosis, and treatment of melanoma, and offers a promising strategy for future biomedical applications.