Endowing titanium surfaces with multifunctional properties can reduce implant-related infections and enhance osseointegration. In this study, titanium dioxide nanotubes with strontium doping (STN) were first created on the titanium surface using anodic oxidation and hydrothermal synthesis techniques. Next, casein phosphopeptide (CCP) and an antimicrobial peptide (HHC36) were loaded into the STN with the aid of vacuum physical adsorption (STN-CP-H), giving the titanium surface a dual function of "antimicrobial-osteogenic". The surface of STN-CP-H has a suitable roughness and good hydrophilicity, which is conducive to osteoblasts. STN-CP-H had a 99 % antibacterial rate against S. aureus and E. coli and effectively prevented the growth of bacterial biofilm. Meanwhile, the antibacterial mechanism of STN-CP-H was initially explored with the help of transcriptome sequencing technology. STN-CP-H could greatly increase osteoblast adhesion, proliferation, and expression of osteogenic markers (alkaline phosphatase, runt-related transcription) when CCP and Sr worked together synergistically. In vivo, the STN-CP-H coating could effectively promote new osteogenesis around titanium implant bone and had no toxic effects on heart, liver, spleen, lung and kidney tissues. A potential anti-infection bone healing material, STN-CP-H bifunctional coating developed in this work efficiently inhibited bacterial infection of titanium implants and encouraged early osseointegration.