The bank lost $380m during the quarter, compared with a profit of $5.7bn in the same period last year.
JPMorgan is currently in talks with the US government over a potentially huge settlement relating to the sale of mortgage-related investment products in the run-up to the financial crisis.
Last month, it paid $920m to settle charges related to a trading scandal.
JPMorgan’s chief executive, Jamie Dimon, said: “We continuously evaluate our legal reserves, but in this highly charged and unpredictable environment, with escalating demands and penalties from multiple government agencies, we thought it was prudent to significantly strengthen them.”
He stressed that the bank’s underlying business was strong.
Stripping out one-off charges, the bank made $5.8bn over the three months to the end of September.
Wells Fargo, the biggest US mortgage lender, also reported results on Friday.
It reported a record net income of $5.3bn in the third quarter, up 13% on the same period in 2012.
That rise came despite a fall in income at its mortgage business, where revenue fell 43% to $1.6bn.
The fall was offset by lower expenses and a reduction in funds set aside for loans going bad.
JPMorgan now has a contingency fund of $23bn to cover legal expenses. It also said that it could face litigation-related expenses of another $6.8bn.
It is currently in talks with the Justice Department over a potentially huge settlement, related to the mis-selling of mortgage related products during the US housing boom.
It is thought the settlement could cost as much as $11bn.
Mr Dimon stressed on Friday that much of the case related to deals done by Bear Stearns and Washington Mutual, companies that JPMorgan Chase bought during the financial crisis.
“The Board continues to seek a fair and reasonable settlement with the government on mortgage-related issues and one that recognises the extraordinary circumstances of the Bear Stearns and Washington Mutual transactions, which were undertaken at the request or encouragement of the US government,” he said.
Last month, JPMorgan paid $920m to settle a case related to disastrous trades by Bruno Iksil, who earned the nickname the “London Whale” for his big bets on the financial markets.
Last year, the bank admitted to losses of $6.2bn resulting from his activities.
As part of the settlement deal, JPMorgan admitted violating US federal securities laws.