This study employs first-principles calculations to investigate the impact of solute segregation on the mechanical properties of the Mg twin boundary (TB). The investigation delves into single-element segregation and multielement cosegregation at the Mg{101¯1} twin boundary. Several parameters, including segregation energy, solubility energy, and strengthening/embrittlement energy, are determined, and Voronoi volume and electronic structure evolution are analyzed. The study discloses the effects of 21 solute single-segregation, as well as the segregation mechanism of Ca, Y, and Zn solute elements in paired combinations. A comparative assessment of the optimal combination for cosegregation of Ca/Y atoms with larger atomic radii and Zn atoms with smaller atomic radii reveals that the solute elements Ca and Y induce more robust energy changes at the interface segregation than Zn. Additionally, electronic structure analysis suggests that charge transfer between solute atoms with large atomic radii and solute atoms with small atomic radii can strengthen the chemical bond at the twin boundary, thereby enhancing the maximum tensile degree, ductility, and formability of the material. The outcomes of this investigation have significant theoretical implications for composition design and the development of novel high-performance multielement magnesium alloys.