The 33-year-old has been without a club since leaving Brazilian side Atletico Mineiro in January.
Wolves were in need of attacking options after new signing Sasa Kalajdzic suffered a cruciate knee ligament injury on his debut against Southampton last weekend.
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."
Wolves have scored just three goals in their opening six games of the Premier League season and sit 14th in the table with six points.
Costa scored 59 goals in 120 games for Chelsea in his previous spell in England, leading the Blues to two Premier League titles.