A method of confined synthesis of nanostructured material inside a mesoporous material. The method includes the step of providing mesoporous material having uniform and ordered mesopores. Next, a monolayer of charged functional group is attached on the pore surface of mesoporous host material by reacting with functional molecule. A oppositely-charged molecule is incorporated into the confined space of mesoporous material by either ion exchange or incipient wetness impregnation. Finally, the incorporated molecule is reduced or oxidized or further reacted with secondarily-incorporated molecule to form nanostructured material in mesoporous material.