We report the preparation of mesoporous mixed metal oxides (MMOs) through a soft template method. Different amounts of P123 were used as structure directing agent to synthesize P123-templated Mg–Al layered double hydroxides (LDHs). After calcination of as-synthesized LDHs at 500 °C, the ordered mesopores were obtained by removal of P123. The mesoporous Mg–Al MMOs fabricated by using 2 wt% P123 exhibited a high specific surface area of 108.1 m 2/g, and wide distribution of pore size (2–18 nm). An investigation of the “memory effect” of the mesoporous MMOs revealed that they were successfully reconstructed to ibuprofen intercalated LDHs having different gallery heights, which indicated different intercalation capacities. Due to their mesoporosity these unique MMOs have particular potential as drug or catalyst carriers.