In this study, we present a new composite material that was developed using the pressure infiltration method. In this composite, carbon reinforcement in the form of an open-celled rectangular foam (C of ) was applied, and pure magnesium with two commercial magnesium cast alloys (AZ31, RZ5) was used as the matrix. We examined the microstructure (LM, SEM + EDS) of composites as well as the density, porosity, hardness, compressive strength, flexural strength and tribological properties in dry conditions. It was revealed that the chemical composition of the matrix had a significant impact on the macrostructure, microstructure and properties of the composite. The matrix with rare elements (RZ5) induced poor infiltration of C of and physicochemical degradation of the reinforcement, while pure magnesium ensured good infiltration, a stable friction coefficient and low wear. For the AZ31 alloy, the effects of infiltration were good; however, an increase in the tribological properties was not observed. Compared with the as-cast matrix materials, the presence of carbon foam in both pure Mg and AZ31 alloy induced an increase in compressive strength and stiffness as well as a decrease in flexural strength. Furthermore, SEM examination of the fractured and wear surfaces microstructure showed structural effects' dependence on the matrix composition.