Mg3Sb2-based compounds are promising thermoelectric materials because of their excellent thermoelectric performance, low cost, and good mechanical properties. In this work, Er, Dy, Gd, and Nd are all confirmed to be effective n-type dopants for optimizing the carrier concentration, increasing the density of states effective mass, and suppressing the ionized impurity scattering of Mg3Sb2-based compounds. By increasing the sintering temperature, a larger grain size can be achieved and can effectively improve the carrier mobility in the whole measured temperature range. As a result, maximum zTvalues above ∼1.6 at 673 K and average zTs above ∼1.0 between 300 and 673 K were achieved for Mg3.07Er0.03Bi0.5Sb1.5, Mg3.07Dy0.03Bi0.5Sb1.5, and Mg3.07Nd0.03Bi0.5Sb1.5. In addition, a high compressive strength of ∼180 MPa was obtained in Mg3.07Dy0.03Bi0.5Sb1.5. Therefore, rare-earth element-doped Mg3Sb2-based compounds are promising for thermoelectric applications.