Ordered mesoporous rutile and anatase TiO2 samples are prepared using mesoporous silica SBA-15 as template and freshly synthesized titanium nitrate and titanium chloride solutions as precursors. The rutile material formed from the nitrate solution is monocrystalline and contains minimal amounts of Si with a Si:Ti ratio of 0.031(4), whereas the anatase material formed from the chloride solution comprises nanocrystals and contains a higher content of Si with a Si:Ti ratio of 0.18(3). It is found that control of temperature and selection of Ti-containing precursor play important roles in determining the crystal phase and crystallinity. A possible formation mechanism of porous crystalline TiO2 is suggested. Characterization of these porous materials is performed by XRD, HRTEM, and nitrogen adsorption/desorption. SBA-15-templated mesoporous rutile TiO2 exhibits a higher Li ion insertion capability than KIT-6-templated TiO2 due to its larger surface area. Likewise mesoporous anatase TiO2:SiO2 composite has a better photoactivity than bulk TiO2 or TiO2-loaded SBA-15 for bleaching methylene blue.