Costa departs Valencia
The 33-year-old defender has plied his trade at the Mestalla since May 2010 after completing his move from Wolfsburg.
Costa's contract was not due to expire until June 2015, but the Portugal international - who made 20 La Liga appearances last season - will leave the club 12 months early.
"I'm leaving Valencia in good conscience and with the affection of the fans," he told the club's official website.
"[These] have been years of great happiness where I felt the support of the fans in good times and bad times.
"I want to send greetings to all Valencianistas, the workers, my colleagues, the media and everyone with whom I have shared moments.
"It is time to start a new stage in my career, but I always take Valencia in my heart. I was proud to be captain of this team."
Costa was not thought to feature in the plans of new head coach Nuno Espirito Santo, who replaced Juan Antonio Pizzi earlier in July.