The agreement eclipses the record $4 billion levied on oil giant BP in January over the worst offshore oil spill in U.S. history.
Still to come is a decision on whether the Justice Department will file criminal charges against JPMorgan. An investigation is under way by the U.S. Attorney's office in Sacramento, Calif.
The nation's biggest bank will pay more than $6 billion to compensate investors, pay $4 billion to help struggling homeowners and pay the remainder as a fine.
JPMorgan has said most of its mortgage-backed securities came from Bear Stearns Cos. and Washington Mutual Inc., troubled companies that JPMorgan acquired in 2008.
As part of the $6 billion to investors, $4 billion will resolve government claims that JPMorgan misled mortgage finance giants Fannie Mae and Freddie Mac about risky mortgage securities the bank sold them before the housing market crashed. That part of the deal was announced Oct. 25. Fannie and Freddie were bailed out by the government during the crisis and are under federal control.
The $13 billion JPMorgan settlement amount is only about half of its record 2012 net income of $21.3 billion, or $5.20 a share, which made it one of the most profitable U.S. banks last year.
Mounting legal costs from government proceedings pushed JPMorgan to a rare loss in this year's third quarter, the first under CEO Jamie Dimon's leadership. The bank reported Oct. 11 that it set aside $9.2 billion in the July-September quarter to cover the string of legal cases against the bank. JPMorgan said it has placed $23 billion in reserve to cover potential legal costs.
On Friday, the company announced it had reached a $4.5 billion settlement with 21 major institutional investors over mortgage-backed securities issued by JPMorgan and Bear Stearns between 2005 and 2008. The investors, which include Goldman Sachs, said the bank deceived them about the quality of high-risk mortgage securities.