Alvarez will move to become the vice-chairman of Banco Santander, and the executive chairman of its Spanish division.
Santander chairman Ana Botin said Orcel had been working with the bank for the past two decades "in the development and execution of our strategy, and understands and is aligned with the Santander culture".
Orcel has been an advisor to the Botin family that controls Santander for many years, and had supported Botin's father Emilio at the helm of the Spanish bank until his death in 2014.
"He brings a deep understanding of retail and commercial banking, as well as a strong track record in managing diverse teams across Europe and the Americas in a collaborative way," Botin added.
Orcel will be replaced at UBS by Piero Novelli and Robert Karofsky as joint heads of its investment bank.
Scheduled to leave his UBS position next week, he had previously been pegged as a potential candidate to succeed UBS' chief executive Sergio Ermotti.
He is also best known for his advisory role in the 2007 acquisition of ABN Amro by Santander, RBS and Fortis. The latter two were later nationalised by their respective governments after collapsing in the wake of the financial crisis.