Mesoporous materials are of technological interest because of their applications ranging from catalysts, molecular sieves, separation technology and gas sensors, to batteries and electronics. Here we demonstrate a synthetic methodology that allows us to create an ordered mesoporous nanocomposite with a crystalline oxide framework. We design a 'nanocrystal-glass' configuration to build a nanoarchitecture by means of surfactant-templated self-assembly followed by the controlled in-situ crystallization of materials. Functional nanocrystals are used as the building blocks of ordered mesopores, and the glass phase can act both as the 'glue' between nanocrystals and as a functionalized component in the composites. Specifically, we demonstrate this methodology for ordered mesoporous nanocomposites consisting of electrochemically active nanocrystals and semiconductive glass in the TiO2-P2O5-M(x)O(y) systems (where M is a metal ion). This approach could be applied to many other multicomponent oxides to fabricate mesoporous nanocomposites for numerous uses.