Costa was a free agent after terminating his contract in his second spell with Atletico Madrid in December 2020.
Costa suffered a number of fitness issues and poor form after returning to Atletico Madrid from Chelsea in January 2018. He scored two goals in seven La Liga appearances last season before having his contract terminated due to personal reasons.
Atletico Mineiro confirmed the striker's arrival in an official statement on their website, which reads: "Diego Costa is a Galo player.
"The athletic board and the player reached an agreement today. Galo will be his first club as a professional athlete in Brazil."
Atletico Mineiro are currently leading the Brazilian Serie A table, five points ahead of second placed Palmeiras. They are into the quarterfinals of the Copa Libertadores, holding a 1-0 advantage over River Plate from the first leg in Argentina.
Costa won the La Liga title with Atletico in his first spell at the club and added the Europa League trophy in his second.
Costa’s three-year stint at Chelsea produced two Premier League titles and one League Cup.
Costa was born in Brazil but has represented Spain at international level, winning 24 caps for La Roja and scoring ten goals.