It resolves allegations of discriminatory loans. Madigan's office filed suit against Bank of America subsidiary Countrywide Financial last year.
The settlement, announced Wednesday by the U.S. Department of Justice, grew out of that lawsuit.
Madigan says Countrywide consistently sold African-American and Hispanic borrowers riskier loans at a higher cost than it sold to white borrowers with similar credit.
The settlement is subject to court approval. Countrywide was purchased by Bank of America in 2008.