Background Due to the deep tissue penetration and reduced scattering, NIR-II fluorescence imaging is advantageous over conventional visible and NIR-I fluorescence imaging for the detection of bone growth, metabolism, metastasis, and other bone-related diseases. Methods Bone-targeted heptamethine cyanine fluorophores were synthesized by substituting the meso -carbon with a sulfur atom, resulting in a bathochromic shift and increased fluorescence intensity. The physicochemical, optical, and thermal stability of newly synthesized bone-targeted NIR fluorophores was performed in aqueous solvents. Calcium binding, bone-specific targeting, biodistribution, pharmacokinetics, and 2D and 3D NIR imaging were performed in animal models. Results The newly synthesized S-substituted heptamethine fluorophores demonstrated a high affinity for hydroxyapatite and calcium phosphate, which improved bone-specific targeting with signal-background ratios > 3.5. Particularly, P800SO3-PEG showed minimum nonspecific uptake, and most unbound molecules were excreted into the urinary bladder. Histological analyses demonstrated that P800SO3-PEG remained stable in the bone for over two weeks and was incorporated into bone matrices. Interestingly, the flexible thiol ethylene glycol linker on P800SO3-PEG induced a promising photothermal effect upon NIR laser irradiation, demonstrating potential theranostic imaging. Conclusions P800SO3-PEG shows a high affinity for bone tissues, deeper tissue imaging capabilities, minimum nonspecific uptake in the major organs, and photothermal effect upon laser irradiation, making it optimal for bone-targeted theranostic imaging. Supplementary Information The online version contains supplementary material available at 10.1186/s40824-022-00294-2.