The merger would create the world’s largest airline.
As part of the agreement, which must still be approved by a judge, the airlines will give up slots at several US airports.
The two companies argued the consolidation was necessary to their survival.
The US Justice Department had sued to stop the $11bn (£6.9bn) merger in August, arguing it would reduce competition and result in higher prices for consumers.
“This agreement has the potential to shift the landscape of the airline industry…[and] ensures airline passengers will see more competition on nonstop and connecting routes throughout the country,” said Attorney General Eric Holder in a statement.
‘Better than litigating’
The two airlines will each give up 57 slots to low-cost carrier airlines at Ronald Reagan International Airport in Washington DC and 34 slots at LaGuardia Airport (LGA) in New York City.
The companies say this will result in 44 fewer daily departures at Reagan and 12 fewer daily departures at LGA – a fraction of the close to 400 daily flights that the airlines operate from those two airports.
“They dominated Reagan Airport, that’s why they had the Department of Justice concerned,” Ray Neidl, an airline analyst at Nexa Capital, told the BBC, who said that giving up slots at the airport was an unsurprising part of the agreement.
“It was better than litigating,” he added.
An additional two slots each at Boston Logan International, Chicago O’Hare International, Dallas Love Field, Los Angeles International and Miami International airports will be released.
The slots will be given to low cost airlines like JetBlue and Southwest.
“This agreement allows us to take the final steps in creating the new American Airlines,” said Tom Horton, head of American Airline’s parent corporation, AMR, in a statement.
The company now says it expects the merger to be finalised in December 2013.
AMR Corp has been in a bankruptcy restructuring for two years and it is hoped that once the merger is finalised, the company will be able to complete its turnaround.
Shares in US Airways traded 3.5% higher before being halted on pending news. They were lower once the specifics of the deal had been announced.
The anti-trust trial had been scheduled to start later this month.
The US Justice Department had been joined by the attorneys-general of Arizona, Florida, Pennsylvania, Michigan, Tennessee, Virginia, and the District of Columbia, but all have agreed to the proposed settlement.