More and more research has been focused on the improvement of the mechanical properties and the optimal design of the new excellent Mg-based alloys. In spite of many experimental investigations, the theoretical studies of the mechanical properties are very scarce. First-principle calculations of the elastic constants and mechanical properties of typical Mg-based alloys become necessary to understand the fundamental mechanism governing the observed mechanical properties. In this paper, the single-crystal elastic constants Cijs of the typical fcc and hexagonal structured Mg-based alloys (Mg3Zn3Y2 and CaMg2) were calculated, using density functional theory within the generalized gradient approximation. Then the bulk modulus B, shear modulus G, Young’s modulus E, Poisson’s ratio ν and anisotropy value A were derived from single-crystal elastic constants. The mechanical properties such as the ductility and stiffiness of the alloys are analyzed and discussed in comparison with experimental observations.