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.
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1
Get daily World Cup 2022 news, updates and other football frolics to your inbox
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.