We perform self-consistent Qb initio pseudopotential calculations to study the structural properties of Mg- and Zn-based binary compounds and the stability of MgSe-ZnSe ordered superlattices. For more ionic MgS and MgSe, the rocksalt structure is found to be more favorable over both the zinc-blende and wurtzite phases, while the zinc-blende structure is most stable for ZnS and ZnSe. Because of the imperfect d-orbital screening, the Zn-based compounds have smaller lattice constants and larger bulk moduli. For both the bulk and epitaxial MgSe-ZnSe superlattices ordered in the CuAu-I, CuPt, and chalcopyrite structures, the lattice mismatch between binary constituents gives rise to high strain energy, resulting in lattice instability against phase segregation into their binary components at T = 0. Similar lattice instabilities are also found for epitaxial common-anion MgxZn1-xS superlattices ordered in the chalcopyrite or famatinite structure. However, we find that common-cation MgSySe1-y and ZnSySe1-y superlattices grown on (001) GaAs and ordered in the chalcopyrite or famatinite structure are thermodynamically stable and exhibit the charge transfer from less ionic bonds to more ionic bonds, similar to the common-anion superlattices. Since the electronegativity of the S atom is higher than that for the Se atom, the charge transfer to the S atom compensates for the strain energy and stabilizes epitaxial superlattices.