Three-dimensional (3D) pore microstructure was investigated for six types of carbon nanotube (CNT) reinforced magnesium (Mg) composite foams with various porosities (i.e. 29%, 39%, and 49%) and compositions (0.05 wt.% CNT and 1 wt.% CNT) using a nondestructive x-ray micro-computed tomography technique. The data were analyzed to explore the effect of overall porosity and carbon composition on 3D pore microstructure such as the number of large pores, pore connectivity, pore size, pore size distribution, pore shape distribution, and specific surface area. The increase of overall porosity resulted in more large and connected pores, and a larger specific surface area. For all studied composite foams, pore size varies in the range of several microns to hundreds of microns; over 80% of the pores have the aspect ratio ≤ 2 and over 96% of the pores have the aspect ratio ≤ 3. The volume fractions are very low for the pores with the smallest and biggest sizes. The volume fraction for pores with a size ≥ 40 μm (i.e. the average size of raw Mg powders) increases from almost 40% to about 50% and then to almost 80% when the overall porosity increases from 29% to 39% and then to 49%. A critical pore size was defined and extracted for each of the studied foams and this size increases with the increase of overall porosity. Additionally, the variation of CNT concentration only slightly affects the pore microstructure.