The former Chelsea striker still has a deal set to expire in June 2021 with the La Liga giants but he has asked the club to end his stay prematurely due to personal reasons.
This means the 32-year-old can now join a new club for free in the January transfer window.
“Atlético de Madrid and Diego Costa have reached an agreement for the termination of the striker’s contract, which was to end on June 30, 2021,” an Atletico statement read on Tuesday.
“The striker asked to leave the club for personal reasons a few days ago and on Tuesday signed the termination of his contract.
“The club thanks Diego Costa for his dedication during these years and wishes him well in the next stage of his professional career.”
“We have spent a lot of time together over the years, he has given us a lot and we have given him a lot too,” Atletico coach Diego Simeone said on Tuesday.
“We spoke about his personal issues and the club wanted to help him without harming its own interests and we feel better now we have resolved the issue.
“He felt the need to find a new challenge, and I’m sure wherever he goes he will do well, because he’s a fighter.”
Costa first joined Atletico in 2006 when he was just 17 and managed 43 goals in 94 appearances for the club between 2010 and 2014.
He also helped Simeone’s side to the Spanish title in 2014 with 27 goals but missed out on that year’s Champions League with an extra-time defeat to Real Madrid in Lisbon.
Costa moved to the Premier League in 2014 to join Chelsea in a £34.2m deal and went on to score 58 goals in 120 appearances for the club, winning two Premier League titles at Stamford Bridge under Jose Mourinho and Antonio Conte.
However, his final days at the club were unpleasant as he was frozen out by Conte in the summer of 2017 and he opted to return to Atletico in a £54m deal the following January.
He immediately had instant success with the side, helping Diego Simeone’s side win the Europa League with a 3-0 final win against Marseille and the UEFA Super Cup against Real Madrid.
But he was repeatedly interrupted by injuries which caused him to struggle to make a long lasting impact, despite starting 43 La Liga matches since rejoining.