The Zintl compound, n-type Mg3Sb2, has been extensively investigated as a promising thermoelectric material. However, performance degradation caused by the loss of Mg element during device preparation and service is a main disadvantage in its utilization in thermoelectric devices. To suppress volatilization, diffusion, or reaction of Mg, we designed a graded concentration junction to control the interfacial elemental diffusion and improve the stability of the thermoelectric joint. We utilized the reaction product at the Ni/Mg3.2Sb2Y0.05 interface, the phase Mg4.3Sb3Ni, as a barrier layer material, and prepared Mg4.3Sb3Ni/Mg3.2Sb2Y0.05/Mg4.3Sb3Ni junctions. The results show that the interface behavior of the thermoelectric junction is optimized by the gradation of elemental concentration, thermal expansion coefficient, and work function. The Mg4.3Sb3Ni/Mg3.2Sb2Y0.05/Mg4.3Sb3Ni single-leg device showed high thermal stability at 673 K for 20 days, the contact resistance was stable at around 10 μΩ cm2, and the shear strength was maintained at about 20 MPa. The conversion efficiency of its single-leg device maintains nearly 90% of the best performance after aging at 673 K for 20 days.