Recent years have witnessed a surge of interest in tuning the optical properties of organic semiconductors for diverse applications. However, achieving control over the optical bandgap in the second near-infrared (NIR-II) window has remained a major challenge. To address this, here we report a polaron engineering strategy that introduces diverse defects into carbon quantum dots (CQDs). These defects induce lattice distortions resulting in the formation of polarons, which can absorb the near-field scattered light. Furthermore, the formed polarons in N-related vacancies can generate thermal energy through the coupling of lattice vibrations, while the portion associated with O-related defects can return to the ground state in the form of NIR-II fluorescence. On the basis of this optical absorption model, these CQDs have been successfully applied to NIR-II fluorescence imaging and photothermal therapy. This discovery could open a promising route for the polarons of organic semiconductor materials as NIR-II absorbers in nanomedical applications.