Hydrolysis of TiCl4 in a diether-functionalized imidazolium ionic liquid (IL), namely 1-methyl-3-[2-(2-methoxy(ethoxy)ethyl]imidazolium methane sulfonate (M(MEE)I⋅CH3 SO3 ), results in a heterostructured organic/inorganic and sponge-like porous TiO2 material. The thermal treatment (300 °C) followed by calcination (500 °C) affords highly porous TiO2 . The characterization of the obtained samples (with and without IL, before and after calcination) by XRD, SEM, and TEM reveals TiO2 anatase crystalline phases and irregular-shaped particles with different porous structures. These hierarchical-structured mesoporous TiO2 nanomaterials were employed as efficient photocatalysts in the water-splitting process, yielding up to 1304 μmol g(-1) on hydrogen production.