State officials "have come nowhere near" demonstrating that the law passes constitutional muster, said U.S. District Court Judge Matthew Kennelly.
Democratic Gov. Rod Blagojevich and other supporters of the measure argued that children were being harmed by exposure to games in which characters go on killing sprees or sexual escapades.
Opponents declared the law a restriction on free speech and pointed out that similar laws had been struck down in other states.
"It's unfortunate that the state of Illinois spent taxpayer money defending this statute. This is precisely what we told them would happen," said David Vite, president of the Illinois Retail Merchants Association, one of the groups that sued over the law.
Blagojevich said Friday he will appeal the ruling.
"Parents should be able to expect that their kids will not have access to excessively violent and sexually explicit video games without their permission," he said.