A simple, efficient approach for the loading of Ag nanoparticles on poly(dopamine)-modified TiO2 nanotubes was used to prepare a Ag nanoparticle–poly(dopamine)–TiO2 nanotube composite that was applied as a long-term antibacterial agent to inhibit the growth of bacteria.