The agreement, to be announced as soon as Thursday, would settle a probe by the Justice Department and a group of states related to banking practices dating to the financial crisis, according to a person familiar with the deal.
The government accused the bank of misleading the buyers of mortgage-backed securities about the quality of the loans.
The settlement includes payments by the bank for penalties as well as relief for homeowners.
It's a large sum, even for the large bank: it made just over $17 billion in profits from 2011 to 2013 -- and about $2 billion more in the past six months.
Bank of America representatives declined to comment Wednesday.
Related: Settlements bite into BofA profits
Attorney General Eric Holder and Bank of America (BAC) CEO Brian Moynihan reached the main terms of the agreement in a telephone call in late July.
To move along the negotiations, the Justice Department had threatened to file a lawsuit against the bank. Paul Fishman, the U.S. Attorney in New Jersey, has led a civil probe of the mortgage business of Merrill Lynch, which Bank of America acquired in 2009.