We investigate effects of solute atoms on twin boundaries and surfaces of Mg alloys by First-principles calculations. Most of solute atoms are stable or unstable at each twin boundary sites, depending on the atomic radius; solute atoms larger than Mg are stable at the extension site on twin boundaries and unstable at the compression site. On the other hand, the surface energy of the basal plane is lowest. Solute atoms at surfaces affect the surface energies. The variation of the surface energy reflects the cohesive energy of the solute element.