Spin-transfer torque (STT) and spin-orbit torque (SOT) form the core of spintronics, allowing for the control of magnetization through electric currents. While the sign of SOT can be manipulated through material and structural engineering, it is conventionally understood that STT lacks a degree of freedom in its sign. However, this study presents the first demonstration of manipulating the STT sign by engineering heavy metals adjacent to magnetic materials in magnetic heterostructures. Spin torques are quantified through magnetic domain-wall speed measurements, and subsequently, both STT and SOT are systematically extracted from these measurements. The results unequivocally show that the sign of STT can be either positive or negative, depending on the materials adjacent to the magnetic layers. Specifically, Pd/Co/Pd films exhibit positive STT, while Pt/Co/Pt films manifest negative STT. First-principle calculations further confirm that the sign reversal of STT originates from the sign reversal of spin polarization of conduction electrons.