Carl C. Icahn is taking his claim to court to prevent Realogy from debt refinancing deal.

Mr. Icahn’s High River Limited Partnership has filed a lawsuit against the Realogy Corporation, seeking to block the company’s $1.1 billion debt refinancing deal. Realogy, owner of the franchised real estate brokers Century 21 and Coldwell Banker, is controlled by the private equity giant Apollo Management – run by Mr. Icahn’s close friend and fellow billionaire, Leon Black.

Apollo, which bought Realogy for $6.6 billion in April 2007, wants to reduce the company’s debt load by up to $650 million as it tries to ride out the housing crisis. Realogy, which is based in Parsippany, N.J., is asking bondholders including Mr. Icahn to swap $1.15 billion in old bonds for about $500 million in new loans that pay a higher interest rate. (Read the lawsuit after the jump.)

Mr. Icahn and other holders of Realogy’s senior-secured debt, which is the first to get paid if the company files for bankruptcy, argue in the complaint that Realogy’s credit agreement does not allow it to issue the newly proposed debt. Under the refinancing plan, those who agree to exchange their bonds for the new debt will move ahead of those who do not agree in the company’s capital structure.

Bank of New York Mellon, which serves as a trustee for the class of bonds owned by High River, is also a party to the lawsuit, which was filed late Wednesday night – ruining Thanksgiving weekend for a lot of lawyers.

Realogy said in a filing with the Securities and Exchange Commission on Tuesday that investors holding about $523 million in principal have tendered their debt, which would result in the company issuing about $237 million of new loans that sit above Mr. Icahn’s bonds in the capital structure.

High River accuses Apollo of self-interest in Realogy’s refinancing that only serves to “delay the inevitable failure of Realogy,” according to the complaint filed in Delaware Chancery Court. High River also contends that Realogy is insolvent and that the new debt offering constitutes a “fraudulent conveyance” by the company.

“The company believes that the allegations contained in the complaint are without merit and intends to vigorously defend this action,” Realogy said in the S.E.C. filing. A hearing on the case is scheduled for Dec. 15 and the closing of the tender offer has been delayed by about a week.

Realogy has reported $209 million of losses in the last three quarters as the credit crunch has severely curbed sales of new and existing homes.

Before starting Apollo, Mr. Black was head of investment banking at Drexel Burnham Lambert in the 1980’s and advised Mr. Icahn on several big deals in the 1980’s. The two have remained close since then.