Titanium dioxide (TiO ) spheres are potential candidates to fabricate three-dimensional (3D) photonic crystals owing to their high refractive index and low absorption in the visible and near-infrared regions. Here, TiO spheres with both high surface charge density and uniform size, which are necessary for the self-assembly of TiO spheres, have been prepared by means of sol-gel methods in ethanol in the presence of thioglycolic acid as ligand. Thioglycolic acid, which contains two functional groups, not only acts as coordinating ligand for stabilizing and controlling the growth of TiO spheres but also endows the resulting TiO spheres with high charge density as based on ζ-potential analysis when the pH of the TiO aqueous dispersion was 6.5 or higher. The SEM images illustrate that the diameter of the prepared TiO spheres can be tuned from 100 to 300 nm by simply controlling the concentration of H O. FTIR spectra confirm that thioglycolic acid bonded to the surface of TiO spheres through carboxylic groups. As anticipated, the obtained TiO spheres could self-assemble to form a 3D opal photonic crystal structure by means of a simple gravity sedimentation method. Then the TiO spheres in the 3D opal photonic crystal structure were able to transform into a pure anatase phase by annealing at different temperatures.