One of the biggest leveraged buyouts of an American company is preparing to file for bankruptcy protection, brought to its knees by heavy debt and a misguided bet on the direction of natural gas prices.

Energy Future Holdings Corp., previously called TXU Corp., is lining up loans to keep two subsidiaries operating during bankruptcy proceedings after months of talks have failed to produce an agreement with creditors on reworking its...