The ruling by District Court Judge Stephanie Stacy in Lincoln, the capital, said the law, known as Legislative Bill 1161, violated the Nebraska Constitution by shifting control over oil-pipeline routing decisions to the governor from the state Public Service Commission.
Three Nebraska landowners had sued to block the proposed path, arguing Republican Gov. Dave Heineman shouldn't be able to sign off on the pipeline's route, the Wall Street Journal said.
Heineman was given that power in 2012 when the state Legislature passed LB 1161.
Stacy ruled lawmakers overstepped their authority and the governor's approval "must be declared null and void" because it was based on an unconstitutional law.
The ruling can be found at tinyurl.com/UPI-Keystone-ruling.
State Attorney General Jon Bruning, who defended the law in court, filed a notice of appeal to the Nebraska Supreme Court late Wednesday, the Lincoln Journal Star reported.
A notice of appeal is the first step in the appeals process.
Heineman supported the appeal, saying in a statement, "This is an important issue for the state of Nebraska."
Pipeline developer TransCanada Corp. of Calgary, Alberta, said it was "disappointed" and disagreed with the decision.
"TransCanada continues to believe strongly in Keystone XL and the benefits it would provide to Americans -- thousands of jobs and a secure supply of crude oil from a trusted neighbor in Canada," the energy company said.
Attorney Dave Domina, who represents the Nebraska landowners, said Stacy's ruling Wednesday put a stop to TransCanada's plans.
"TransCanada has no approved route in Nebraska. TransCanada is not authorized to condemn the property against Nebraska landowners," he said in a statement. "The pipeline project is at a standstill."
The U.S. State Department, which must approve the pipeline's construction because it crosses an international border, said it would not comment on active litigation, Politico said.
The department released its final environmental analysis last month, saying the $5.4 billion pipeline system -- which would carry crude oil and highly viscous petroleum 2,151 miles from the unconventional petroleum deposits of Alberta to U.S. Gulf Coast refineries in Texas and Louisiana -- would have little effect on climate change.
But the department must still determine if having the pipeline is broadly in U.S. interest.
Environmentalists and some U.S. lawmakers oppose the pipeline, arguing that despite the State Department report, it would exacerbate greenhouse-gas emissions by speeding oil-sands development. Supporters say it would create thousands of jobs construction jobs.
Stacy said in her ruling the case wasn't about the pipeline project's merits.
"TransCanada's Keystone XL Pipeline has become a political lightning rod for both supporters and opponents of the pipeline, but the issues before this court have nothing to do with the merits of that pipeline," she wrote. "This case involves constitutionality of LB 1161."