Atletico was banned from making transfers over the summer, which kept the move on hold.
The two clubs spent the entire transfer window trying to come up with an agreement that would suit all parties, but hit several impasses.
Brazil-born Costa joined Chelsea from Atletico for a reported £32m three years ago.
It was reported early last summer that Chelsea's coach Antonio Conte told Costa he was no longer part of the English club's plans for the future and should seek another team.
Atletico said the 28-year-old Brazil-born Spain worldwide, who left the club to join Chelsea in 2014, would have a medical in the next few days before completing the move in the New Year.
"The transfer will be subject to the agreement of personal terms and a medical".
Costa will head back to his former club for a reported £53m after both clubs reached an understanding.
Atletico Madrid is serving a transfer ban so Diego Costa can not play to the Spanish team until January.
Luiz missed Wednesday night's 5-1 Carabao Cup win over Nottingham Forest and will also be ineligible for the Premier League clashes with Stoke and, crucially, Manchester City.
At the time Costa seemed on the verge of signing a lucrative deal with Chinese Super League club Tianjin Quanjian.
The France star's dazzling displays earned him third place behind Cristiano Ronaldo and Lionel Messi in the Ballon d'Or and Best FIFA Men's Player standings in 2016.
Liam is ESPN FC's Chelsea correspondent.
- FM Zarif blasts Trump's 'unworthy' anti-Iran remarks at UNGA
- Trump, Pence and Palin campaign for senate candidates: will it help?
- Hillary takes shots at Trump and Putin
- Ryanair cancels hundreds of flights, sparking outrage from customers
- Newly announced Amazon Fire HD 10 costs $149.99
- Marcus Rashford double fires United to easy win over Burton
- Veep: Julia Louis-Dreyfus Makes History at Emmys
- Spanish police arrest Catalan official in referendum row
- Germany's big parties suffer small drop in support
- Shares tap brakes, dollar reverses as Fed focus builds