The former Chelsea forward has been without a club since January after leaving Brazilian Serie A side Atletico Mineiro.
The 33-year-old completed his medical on Thursday and is expected to act as cover for another new signing Sasa Kalajdzic, who suffered an injury on debut.
Wolves chairman Jeff Shi said: "We are absolutely delighted to welcome Diego Costa to Wolves, and back to the Premier League.
"A serial winner with a wealth of experience at the highest level, Diego will bring something unique to our dressing room and on the pitch, and we look forward to his impact at Molineux and Compton this season."
Costa won two Premier League titles during his time at Stamford Bridge and brings with him a wealth of experience.
The player scored 52 goals in his 89 Premier League appearances but has struggled to replicate those numbers since leaving Chelsea in 2017.
Costa scored just 19 goals in 81 appearances for Atletico Madrid during his second spell at the Spanish club.
The striker most recently helped Atletico Mineiro to the Brazilian Serie A title. During his time at the club, Costa scored just five goals in 19 appearances across all competitions.