WASHINGTON—The biggest settlement between the government and a U.S. company ever grew out of the Justice Department's discovery of a 2006 meeting in which executives for J.P. Morgan Chase & Co. decided to continue selling shoddy mortgage securities despite red flags that U.S. officials say should have prevented the offerings, according to people familiar with the deal.

Details of that meeting, along with tens of thousands of documents amassed over the past year by a three-person investigative team in the Sacramento...