The suit claimed the fast food giant was violating consumer laws and exploiting children by trying to lure them to eat nutritionally unbalanced meals.
McDonald's said the suit takes away from the importance of children's health and nutrition.
"We are proud of our Happy Meals and will vigorously defend our brand, our reputation and our food," McDonald's spokeswoman Danya Proud said in a statement. "We stand on our 30-year track record of providing a fun experience for kids and families at McDonald's."
The suit had been filed in late 2010 by Monet Parham, a California mother of two, and The Center for Science in the Public Interest, a consumer advocacy group based in Washington, D.C. The plaintiffs could still appeal the ruling.
The Associated Press contributed to this report.