The retail giant entered the plea in federal court in San Francisco to misdemeanor counts of violating the Clean Water Act and another environmental law regulating pesticides. The fine also settled Environmental Protection Agency allegations.
In Kansas City, Mo., the company pleaded guilty to improperly handling pesticides.
The plea agreements ended a nearly decade-old investigation involving more than 20 prosecutors and 32 environmental groups that has cost Wal-Mart a total of $110 million.
Court documents show illegal dumping occurred in 16 California counties from Del Norte to Orange between 2003 and 2005. Federal prosecutors said the company didn't train its employees on how to handle and dispose hazardous materials at its stores.
The result, prosecutors say, was that waste was tossed into trash bins or poured into sewer systems. The waste also was improperly taken to one of several product return centers throughout the U.S. without proper safety documentation, authorities said.
In 2010, the company agreed to pay $27.6 million to settle similar allegations made by California authorities that led to the overhaul of its hazardous waste compliance program nationwide.
"By improperly handling hazardous waste, pesticides and other materials in violation of federal laws, Wal-Mart put the public and the environment at risk and gained an unfair economic advantage over other companies," said Ignacia S. Moreno, assistant attorney general for the Environment and Natural Resources Division of the Justice Department.
Wal-Mart spokeswoman Brooke Buchanan said the company has fixed the problem and is "obviously happy that this is the final resolution."
She said employees are better trained on how to clean up, transport and dispose of dangerous products such as fertilizer that are spilled in a store or have packages damaged.
Workers are armed with scanners that tell them whether a damaged package is considered to contain a hazardous material, she said
Moreno said the fines against Wall-Mart "will, in part, fund important environmental projects in the communities impacted by the violations and help prevent future harm to the environment."
The state investigation began eight years ago when a San Diego County health department employee saw a worker pouring bleach down a drain.
In another instance, officials said a Solano County boy was found playing in a mound of fertilizer near the garden section of a Wal-Mart. The yellow-tinted powder contained ammonium sulfate, a chemical compound that causes irritation to eyes, skin and the respiratory tract.
Contributing: The Associated Press