The settlement covers the sale of mortgage-backed securities from 2005 to 2007. It requires Goldman to pay $2.385bn in civil penalties, $875m to resolve other federal and state claims, and $1.8bn in other consumer relief.
The deal, however, does not include criminal sanctions or penalties
Acting Associate Attorney General of the US Stuart Delery said: "This resolution holds Goldman Sachs accountable for its serious misconduct in falsely assuring investors that securities it sold were backed by sound mortgages, when it knew that they were full of mortgages that were likely to fail."
Goldman admitted that it made false and misleading representations to prospective investors on mortgage-backed securities it was selling.
In a statement of facts outlined in the agreement, Goldman acknowledged that significant percentages of the loans reviewed between 2005 and 2007 did not conform with it had told investors about the loans.
In January, Goldman said it anticipates the agreement to reduce its earnings for the fourth quarter of 2015 by about $1.5bn after tax.
The settlement was negotiated via the Residential Mortgage-Backed Securities Working Group, a joint state and federal working group established in 2012 to investigate wrongdoing in the mortgage-backed securities market before the financial crisis.
The other banks which agreed to settlement include are Wells Fargo Bank, Bank of America, Citigroup and JPMorgan Chase.
Image: Goldman Sachs Headquarters, New York City. Photo: courtesy of Quantumquark.