Highly organized mesoporous titania and silica thin films were synthesized using a triblock copolymer-templated sol-gel method via an evaporation-induced self-assembly (EISA) process. For the first time, we have found that the mesophase of these metal oxides can be selectively controlled by varying the spin-coating conditions. With spin-coating at a low speed, such as 600 rpm, cubic mesoporous TiO2 or SiO2 thin films are obtained, whereas 2D hexagonal mesoporous thin films are formed at a high spin-coating speed of around 2000 rpm for 20 s. On the other hand, a mixture of hexagonal and cubic phase is formed for films prepared at an intermediate spinning speed of 1000 rpm for 10 s. The fabricated mesoporous thin films, characterized by XRD, TEM, and UV-visible spectroscopy, show that the mesopore structures are highly ordered, without any cracks, and thermally stable ( up to 400 degrees C). The hexagonal and cubic mesoporous TiO2 films of 300 - 320 nm thickness have about 95% transparency and exhibit a ultra-uniform surfaces. We believe that the evaporation rate of volatile components in the coated film is qualitatively proportional to the speed of spin-coating, and this determines the mesophase of the resultant films.