Magnesium hydride nanoparticles were synthesized within a carbon aerogel (CA) scaffold using a dibutylmagnesium precursor. The synthesis reaction was tracked using small-angle X-ray scattering (SAXS) to analyze the structural evolution during MgH2 formation. The CA/MgH2 composite was also investigated using X-ray diffraction (XRD) and transmission electron microscopy (TEM) to provide a better representation of the physical system. The CA has a large quantity of 2 nm pores as shown by nitrogen adsorption data. Both SAXS and TEM investigations confirm that MgH2 does form within the 2 nm pores but XRD proves that there is also a significant quantity of larger MgH2 particles within the system. Variations between hydrogen desorption isotherms from the CA/MgH2 composite and bulk MgH2 are detected that are indicative of changes in the decomposition properties of the small fraction of 2 nm MgH2 nanoparticles within the CA/MgH2 composite, changes which match theoretical predictions.