Soft tissue integration around titanium (Ti) implants is weaker than that around natural teeth, compromising long-term success of Ti implants. Carbon monoxide (CO) possesses distinctive therapeutic properties, rendering it as a highly promising candidate for enhancing STI. However, achieving controlled CO generation at the STI interface remains challenging. Herein, a controlled CO-releasing dual-function coating was constructed on Ti surfaces. Under near-infrared (NIR) irradiation, the designed surface could actively accelerate CO generation for antibiosis against both aerobic and anaerobic bacteria. More importantly, in the absence of NIR, the slow release of CO induces macrophage polarization from pro-inflammatory phenotype towards pro-regenerative phenotype. In a rat implantation model with induced infection, the designed surface effectively controlled the bacterial infection, alleviates accompanying inflammation and modulated immune microenvironment, leading to enhanced STI. Single-cell sequencing revealed that the coating alters the cytokine profile within the soft tissue, thereby influencing cellular functions. Differentially expressed genes in macrophages are highly enriched in the PIK3-Akt pathway. Furthermore, the cellular communication between fibroblasts and macrophages was significantly enhanced through the CXCL12/CXCL14/CXCR4 and CSF1-CSF1R ligand-receptor pair. These findings indicate that our coating showed an appealing prospect for enhancing STI around Ti implants, which would ultimately contribute to the improved long-term success of Ti implants.