Magnesium alloys are extremely attractive candidates for hydrogen storage applications since they can potentially absorb hydrogen between 3 and 8 wt.%. The purpose of this work is to understand the microstructural and the magnetic properties for 3d-transition metal and magnesium alloys with the difficult to alloy by the conventional method due to the positive value of mixing enthalpy. We successfully formed alloys of iron or cobalt, and magnesium powders with a wide range of compositions by mechanical alloying and characterized synthesized alloys with an X-ray diffractometer, a TEM, an SEM-EPMA and a vibration sample magnetometer. The obtained Fe-Mg alloys containing less than 25 at.% Mg were single phase bcc with expanded lattice parameter. The average powder particle size changes with Mg composition. The magnetization of the samples showed a linear dilution with content of Mg. The opposite variations in lattice parameter and the coercive force with Mg content were observed. On the other hand, we observed markedly broadened XRD lines from Co-Mg alloy compounds. The microstructure of these powders implies that the alloy could be partially amorphized or changed into a nanostructure as expected from microscopy and an XRD results.