Currently, two-dimensional materials are being actively pursued in catalysis and other fields due their abundance of defects, which results in enhanced performance relative to their bulk defect-free counterparts. To date, the exploitation of defects in two-dimensional materials to enhance photothermal therapies has received little attention, motivating a detailed investigation. Herein, we successfully fabricated a series of novel CoFe-based photothermal agents (CoFe-x) by heating CoFe-layered double hydroxide (CoFe-LDH) nanosheets at different temperatures (x) between 200-800 °C under a Ar atmosphere. The CoFe-x products differed in their particle size, cobalt defect concentration, and electronic structure, with the CoFe-500 product containing the highest concentration of Co2+ defects and most efficient photothermal performance under near-infrared (NIR, 808 nm) irradiation. Experiments and density functional theory (DFT) calculations revealed that Co2+ defects modify the electronic structure of CoFe-x, narrowing the band gap and thus increasing the nonradiative recombination rate, thereby improving the NIR-driven photothermal properties. In vitro and in vivo results demonstrated that CoFe-500 was an efficient agent for photothermal cancer treatment and also near-infrared (NIR) thermal imaging, magnetic resonance (MR) imaging, and photoacoustic (PA) imaging. This work provides valuable new insights about the role of defects in the rational design of nanoagents with optimized structures for improved cancer therapy.