The lawsuit filed a year ago by the California attorney general and the Los Angeles city attorney claimed Mattel and other companies including RC2, Cranium, Kids II, Amscan and Marvel Entertainment, knowingly exposed children to lead and failed to provide any warning about the risk.
The companies admitted no wrongdoing as part of the settlement.
As part of the agreement, money will be used to create a fund that will monitor the companies' compliance to keep lead out of products for children.
The companies also will immediately adopt new standards set forth in the Consumer Product Safety Improvement Act that bans lead from children's toys.
"These consumer protection agreements will safeguard California's children from lead-contaminated toys this Christmas," California Attorney General Jerry Brown said.
Mattel has "taken steps that go beyond current requirements to give parents greater confidence that the Mattel toys that they buy this holiday season will be the safest ever," the El Segundo-based company said in a statement.