Titanium-based implants have been widely used in orthopedic surgery; however, failures still occur. Our in vitro study has demonstrated that gentamicin-loaded, 80 nm-diameter nanotubes possessed both antibacterial and osteogenic activities. Thus, the aim of this study was to further investigate the in vivo anti-infection effect of the titanium implants with gentamicin-loaded nanotubes. Thirty-six male Sprague Dawley rats were used to establish an implant-associated infection model. A volume of 50 μL
Staphylococcus aureus
suspension (1×10
5
CFU/mL) was injected into the medullary cavity of the left femur, and then the titanium rods without modification (Ti), titanium nanotubes without drug loading (NT), and gentamicin-loaded titanium nanotubes (NT-G) were inserted with phosphate-buffered saline-inoculated Ti rods as a blank control. X-ray images were obtained 1 day, 21 days, and 42 days after surgery; micro-computed tomography, microbiological, and histopathological analyses were used to evaluate the infections at the time of sacrifice. Radiographic signs of bone infection, including osteolysis, periosteal reaction, osteosclerosis, and damaged articular surfaces, were demonstrated in the infected Ti group and were slightly alleviated in the NT group but not observed in the NT-G group. Meanwhile, the radiographic and gross bone pathological scores of the NT-G group were significantly lower than those of the infected Ti group (
P
<0.01). Explant cultures revealed significantly less bacterial growth in the NT-G group than in the Ti and NT groups (
P
<0.01), and the NT group showed decreased live bacterial growth compared with the Ti group (
P
<0.01). Confocal laser scanning microscopy, scanning electron microscopy, and histopathological observations further confirmed decreased bacterial burden in the NT-G group compared with the Ti and NT groups. We concluded that the NT-G coatings can significantly prevent the development of implant-associated infections in a rat model; therefore, they may provide an effective drug-loading strategy to combat implant-associated infections in clinic.