The Spaniard, who joined the Premier League club from Genoa in 2012, will link up with former Swans boss Michael Laudrup in the Middle East.
Flores, 27, was keen to express his gratitude to club's fans and staff as he departed and has left the door open for a potential return in the future.
"I hope this is not a forever goodbye," he said in a statement posted on his Twitter account.
"I wish you all the best for the players, coaches, chairman, directors, all employees of the club, and fans. I will support you all from afar; I will always be a swan.
"Thank you from the bottom of my heart!! Come on Swansea!!"
Flores becomes the third Spaniard to leave the club following the departures Michu and Alejandro Pozuelo already this summer.
The defender’s future has been the subject of speculation recently with manager Garry Monk thought to be keen to reshape the squad he inherited in February in his own image.
Flores’ time in Wales was never short of incident and he was involved in a highly-publicised training ground spat with Monk last season.
He also incurred the wrath of West Ham boss Sam Allardyce for his theatrical reaction to a foul from Andy Carroll which saw the striker sent off at Upton Park.
Keen to leave the Premier League on good terms, Flores included a general apology for any offence he may have caused during his time in England in his farewell statement.
"If, at any time, I disrespected any opponent, coach, referee or rival fans I apologise," he said.