The stability, mechanical properties and anisotropic properties of sound velocities of Ga 2 Mg 5 , GaMg 2 , GaMg, O-Ga 2 Mg, H-Ga 2 Mg and Ga 5 Mg 2 are investigated systematically by the first-principles calculation. The cohesive energy and formation enthalpy are obtained and used to estimate the stability of the Ga-Mg binary compounds. GaMg compound is the most stable and has the lowest formation enthalpy as -0.162eV/atom of those Ga x Mg y compounds. The elastic constants of single crystal, hardness, bulk, shear, Young's modulus and Poisson's ratio of the polycrystalline crystal are obtained and used to estimate the mechanical properties. Ga 5 Mg 2 and H-Ga 2 Mg have the lager bulk, shear and Young's modulus and corresponding B/G is low. H-Ga 2 Mg is harder than the other compounds from the results of Poisson's ratio. The anisotropic mechanical properties are discussed using the anisotropic index, two-dimensional planar projections on different planes of the bulk and Young's modulus. The Young's modulus of H-Ga 2 Mg shows the strongly anisotropy of mechanical properties and GaMg 2 has the weakest anisotropy among all the compounds.