McGinley also cited a "culture of misinformation" that arose as Corbett's administration offered conflicting explanations on how the law would be applied.
Corbett, visiting Philadelphia yesterday, said he had not seen the ruling and that it was being reviewed by his attorneys.
"We'll give you a position after we've had time to review it," Corbett said.
The state Supreme Court, the likely next stop for the case if it is appealed, took a skeptical view in a September 2012 ruling of a new identification card that the state created for people who had difficulty obtaining other identification.
McGinley ruled that the state had no legislative authority to create that new identification.
His ruling also said that a state can't require identification to vote if it doesn't also provide that identification to voters. In a civil trial last year, lawyers challenging the law gave several examples of voters who could not obtain the necessary state identification.
McGinley called that a "substantial threat" to voting rights.
The voter-ID law was passed in March 2012, rasing concerns among Democrats that it was meant to make it more difficult for some voters to cast ballots in that year's presidential election.
Witold Walczak, legal director of the American Civil Liberties Union of Pennsylvania, said yesterday that state attorneys "could not point to a single instance" of voter fraud that would be solved by the new law.
"Which raises the question: Why are they passing these laws?" Walczak asked of voter-ID efforts in state legislatures across the country. "The answer is: It is a voter-suppression tool."
Democratic legislators rejoiced at the ruling while lamenting the millions of dollars spent to implement and then defend the law.
State Sen. Jay Costa, the Democratic minority leader, yesterday said Corbett should not appeal.
"I certainly hope the administration will not spend any more resources trying to defend an unconstitutional law that tried to disenfranchise voters," he said.
On Twitter: @ChrisBrennanDN