Surfactant-mediated chemical routes allow one to synthesize highly engineered shape- and size-controlled nanocrystals. However, the occurrence of capping agents on the surface of the nanocrystals is undesirable for selected applications. Here, a novel approach to the production of shape-controlled nanocrystals which exhibit high thermal stability is demonstrated. Ceria nanocubes obtained by surfactant-mediated synthesis are embedded inside a highly porous silica aerogel and thermally treated to remove the capping agent. Powder X-ray Diffraction and Scanning Transmission Electron Microscopy show the homogeneous dispersion of the nanocubes within the aerogel matrix. Remarkably, both the size and the shape of the ceria nanocubes are retained not only throughout the aerogel syntheses but also upon thermal treatments up to 900 °C, while avoiding their agglomeration. The reactivity of ceria is measured by in situ High-Energy Resolution Fluorescence Detected - X-ray Absorption Near Edge Spectroscopy at the Ce L3 edge, and shows the reversibility of redox cycles of ceria nanocubes when they are embedded in the aerogel. This demonstrates that the enhanced reactivity due to their prominent {100} crystal facets is preserved. In contrast, unsupported ceria nanocubes begin to agglomerate as soon as the capping agent decomposes, leading to a degradation of their reactivity already at 275 °C.