A porous TiO2–Ag core–shell nanocomposite material with a large surface area was synthesized by in situ hydrolyzation of Sn2+-grafted titanium glycolate microspheres in the presence of Ag+ ions. The as-prepared nanocomposite material was shown to serve as an efficient self-cleaning surface-enhanced Raman scattering (SERS) substrate.