(Read more: Five years later, Madoff still trying to control the story)
JPMorgan, Madoff's primary banker for decades, has been in regulators' sights almost since the scandal broke five years ago this week. In 2010, the trustee for the Madoff liquidation, Irving Picard, sued the bank for $19 billion, claiming it was "at the very center of the fraud, and thoroughly complicit in it."
Most of the claims have been dismissed, and Picard has appealed to the Supreme Court, but the settlement talks with the Justice Department and regulators involve similar allegations, sources say.
JPMorgan this week declined to comment about the settlement talks, as did the U.S. Attorney's office in Manhattan and the Office of the Comptroller of the Currency. The bank has previously denied wrongdoing and said its employees acted in good faith.
In multiple emails over the past year, as well as his latest message, Madoff has claimed that JPMorgan and other banks "had to know" about his fraud. He said he offered information about the bank to Picard and his chief counsel, David Sheehan, who this week accused Madoff of "aggrandizing himself" with claims of assistance.
(Read more: 10 white-collar fugitives on the FBI's wish list)
But Madoff insists that his assistance in the JPMorgan case is proving useful.
"You also might ask why Sheehan had no interest in the info I offered … regarding JPMorgan, which the IG of the Treasury Department eagerly accepted from me and is using in his investigation," Madoff wrote.
In 2009, Madoff admitted that for years, rather than executing trades for his clients, he funneled their money into a single Chase bank account. The settlement talks, which sources say could be wrapped up in a matter of weeks, involve allegations that JPMorgan not only turned a blind eye to the activities of a major depositor but sold structured products based on Madoff's purported returns even though it was in a position to know the returns were suspicious.
(Read more: Ponzi schemes in a post-Madoff world)
In October 2008, the bank had alerted the British Serious Organized Crime Agency that Madoff's returns "appear too good to be true" but did not make a concurrent filing in the U.S.
In addition to about $2 billion in fines and penalties, JPMorgan could be subject to a so-called deferred prosecution agreement, requiring the bank to implement reforms over a specified time under the threat of criminal prosecution if it does not comply.
Five years after his arrest, Madoff continues to claim remorse.
"I live with the terrible guilt, shame and remorse for the pain and suffering I have caused to everyone," he wrote.
—By CNBC's Scott Cohn