In the present paper, friction stir processing (FSP) is used to fabricate magnesium-based nanocomposite foams. The effects of the number of FSP passes, TiH 2 to Al 2 O 3 weight ratio, and foaming temperature; on the pore distribution and porosity are described. The results indicate that a minimum TiH 2 to Al 2 O 3 weight ratio is necessary to provide the best pore distribution and porosity. Closed-cell porous magnesium with a porosity of about 17.5% was successfully fabricated using 4-pass FSP at 800 rpm, by adding 5 mass% TiH 2 and 3.5 mass% Al 2 O 3 ; at a holding temperature of 858 K, and a holding time of 45 min.