"There is a substantial likelihood that a New York reporter will be compelled to divulge the identity of a confidential source (or face a contempt sanction) if required to appear in the other jurisdiction — a result that would offend the core protections of the shield law, a New York public policy of the highest order," the court said in overturning a mid-level appeals court's decision supporting the subpoena.
One dissenting judge said New York's law does not protect Winters because the privileged communications with her sources took place in another state.
Winter's attorney welcomed the ruling.
"We are absolutely thrilled and delighted that New York state's highest court has once again reaffirmed how important the protection of confidential sources is to the proper functioning of our society," said the attorney, Dori Hanswirth.
Hanswirth said she did not know whether Holmes' attorneys would appeal to federal court but said a federal judge would have no jurisdiction.
"This case is over as far as Jana Winter," Hanswirth said. "She does not have to appear in Colorado again and she will not appear."
Fox News Chairman and CEO Roger Ailes described the decision as "a major win for all journalists," adding that the "protection of Jana Winter's confidential sources was necessary for the survival of journalism and democracy as a whole."
The ruling was a defeat for Holmes' lawyers, who said Winter's sources had violated the gag order. The defense wanted Winter to identify the sources so Arapahoe County District Judge Carlos A. Samour Jr. in Colorado could somehow punish them.
Daniel King, one of Holmes' attorneys, did not initially return a call seeking comment. Defense lawyers and prosecutors routinely decline to comment, citing the gag order.
The impact of Winter's victory on the overall case against Holmes will likely be minimal, however.
Holmes is accused of opening fire on a packed audience in a movie theater in the Denver suburb of Aurora during a midnight showing of "The Dark Knight Rises" in July 2012. Prosecutors are seeking the death penalty.
He pleaded not guilty by reason of insanity to multiple counts of murder and attempted murder. Defense lawyers have acknowledged Holmes was the shooter, and the central question is whether he was legally insane at the time.
Winter had said she would refuse to comply if the judge ordered her to identify her sources, even though she could have been sentenced to jail indefinitely for contempt of court.
Winter's story, posted on the Fox News website days after the shootings, cited unnamed law-enforcement officials as saying Holmes sent a notebook to his psychiatrist containing scribblings of stick figures being shot and a written description of an upcoming attack.
Authorities have confirmed that Holmes did send the notebook, but they have never publicly said what it contains.