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.
- Governor Scott: 90 percent of power restored to Florida residents
- Aung San Suu Kyi : Myanmar doesn't fear Rohingya scrutiny
- Newly announced Amazon Fire HD 10 costs $149.99
- FM Zarif blasts Trump's 'unworthy' anti-Iran remarks at UNGA
- Tesla making own chip for its autonomous cars
- Trump, Pence and Palin campaign for senate candidates: will it help?
- Tomb Raider: Featurette Talks About Bringing New Life To Lara Croft
- Best Features of iOS 11
- United Kingdom foreign minister Johnson says he will not resign
- Coolest Apple iOS 11 Features That You Might Have Missed