Costa had been without a club since December following his departure from Atletico Madrid after the LaLiga champions agreed to the Brazil-born player's request to rescind his contract.
It was his second spell at Atletico Madrid, having earlier played for the club from 2010-14.
In the 2013-14 season, the 32-year-old helped Atletico to the Spanish title with 27 goals and they also reached the Champions League final but lost 4-1 to rivals Real Madrid in extra-time after Costa was forced off early with a hamstring injury.
Costa joined Chelsea in 2014 and was an instant hit, firing the London club to the 2014-15 and 2016-17 Premier League titles with 20 goals in each campaign.
He returned to Atletico Madrid in January 2018 but injuries limited him to 43 LaLiga starts in three years as he scored 12 goals, and opportunities were further limited by the signings of Joao Felix and Luis Suarez.
The enigmatic striker joins Atletico Mineiro, who defeated second-placed Palmeiras 2-0 earlier on Saturday and extended their lead at the top of Brazil's Serie A to five points.