The agreement will be filed as part of the restructuring of Energy Future, currently before the Delaware bankruptcy court, and will allow the company to emerge from Chapter 11 bankruptcy, NextEra said on Friday.
Energy Future, the largest power company in Texas, filed for bankruptcy on April 29, 2014, in one of the largest ever bankruptcies in the United States.
Oncor owns the largest network of power lines in Texas, reaching 3.3 million homes and businesses. NextEra had briefly pursued a deal for Oncor in 2015.
Weak electricity prices forced Energy Future into bankruptcy after the company could not meet its debt obligations.
When it filed for bankruptcy, the company was buried under a debt of $42 billion, much of it taken to finance the leveraged buyout of what was then TXU Corp by KKR & Co, TPG Capital and an affiliate of Goldman Sachs.
NextEra will buy Energy Future and its 80 percent indirect stake in Oncor through a newly formed subsidiary.
After the transaction closes, Oncor will become the power delivery business of NextEra Energy, whose other units are Florida Power & Light Co and NextEra Energy Resources LLC.