Mesa joined Swansea from Las Palmas last summer, but the midfielder struggled to make his mark in the Premier League, and moved on loan to Sevilla in the January transfer window.
The 29-year-old has now completed a permanent switch to the Estadio Ramon, having completed a medical on Wednesday morning.
"Sevilla FC and Swansea City have reached an agreement for the transfer of Roque Mesa to the Nervionenses. The player passed his medical this Wednesday and has signed for the next three years," read a statement on Sevilla's official website.
Mesa made seven La Liga appearances for Sevilla in the second half of the 2017-18 campaign.