By tuning the anodic voltage and electrochemical reaction time, we have synthesized a series of TiO2 nanofoam–nanotube array structures via a two-step anodic oxidation process. The produced nanofoam–nanotube array demonstrated a remarkable Raman scattering enhancement. The maximum enhancement factors are 2.3 × 105 for methylene blue. Factors such as the nanotube pore size, nanofoam, and solute concentration have been investigated. The Raman scattering enhancement is attributed to the existence of the nanofoam structure, which enables multiple laser scatterings among the periodic voids and allows for the occurrence of Raman scattering. The proposed simple and inexpensive approach can promote the use of TiO2 materials for surface-enhanced Raman scattering applications in chemistry, biology, and nanoscience.