The narrow-gap magnesium silicide semiconductor Mg 2 Si is a promising mid-temperature (600-900 K) thermoelectric material. It intrinsically possesses n-type conductivity, and n-type dopants are generally used for improving its thermoelectric performance; however, the synthesis of p-type Mg 2 Si is relatively difficult. In this work, the hole doping of Mg 2 Si with various impurity atoms is investigated by performing first principles calculations. It is found that the Ag-doped systems exhibit comparable formation energies ΔE calculated for different impurity sites (Mg, Si, and interstitial 4b ones), which may explain the experimental instability of their p-type conductivity. A similar phenomenon is observed for the systems incorporating alkali metals (Li, Na, and K) since their ΔE values determined for Mg (p-type) and 4b (n-type) sites are very close. Among boron group elements (Ga and B), Ga is found to be favorable for hole doping because it exhibits relatively small ΔE values for Si (p-type) sites. Furthermore, the interstitial insertion of Cl and F atoms into the crystal lattice leads to hole doping because of their high electronegativity.