In a letter to AMR employees, CEO Tom Horton said both companies tried to convince the Justice Department that the deal would be good for their customers and for airline competition.
"Since the DOJ has formed a contrary view, the matter will now be settled by the courts," Horton said, a process he said would "likely take a few months."
The airlines had already announced the management team at the combined company, which would be called American Airlines Group Inc. and led by US Airways CEO Doug Parker. Those plans are now on hold.
The lawsuit will not necessarily stop the deal. The airlines could fight back in court, but it might not even get that far.
Analysts said that the Justice Department could be seeking more time and leverage to squeeze out some concessions. Many experts had expected regulators to pressure American and US Airways into giving up some takeoff and landing slots at Reagan National Airport, allowing for new competitors at the busy airport, which is just across the Potomac River from Washington.
Even outside the two companies, many in the airline industry had expected that the deal would easily win regulatory approval like Delta's purchase of Northwest, United's combination with Continental, and Southwest's acquisition of AirTran.
Justice Department officials "didn't have any problem with the Northwest-Delta merger; didn't have any problem with United-Continental. Where did they think it was going to go?" said Robert Mann, an airline consultant who once worked at American.
At the least, the lawsuit could delay AMR's exit from bankruptcy and make a merger slightly less likely, said Daniel McKenzie, an analyst for Buckingham Research Group.
AMR and US Airways announced in February that they planned to merge into a carrier with 6,700 daily flights and annual revenue of roughly $40 billion. By passenger traffic, it would slightly eclipse United Airlines and Delta Air Lines. Along with Southwest Airlines, the deal would leave four airlines dominating the U.S. market.
AMR and US Airways officials had said their merger would help consumers by creating a tougher competitor for United and Delta.
AMR has cut labor costs and debt since it filed for bankruptcy protection. Pilots from both airlines have agreed on steps that should make it easier to combine their groups under a single labor contract, a big hurdle in many airline mergers.
A federal bankruptcy judge in New York was scheduled to hold a hearing Thursday to consider approving AMR's reorganization plan -- one of the last steps before the merger would be completed. The hearing was expected to go ahead. The merger has been approved overwhelmingly by AMR creditors and shareholders and by US Airways shareholders.
In its lawsuit, the Justice Department was joined by the attorneys general from American's home state of Texas, US Airways' home state of Arizona, plus Florida, Virginia, Pennsylvania, Tennessee and the District of Columbia.