"This was an obvious case of deliberate overreaching by the government in an effort to seize data as to which it lacked probable cause," Chief Judge Alex Kozinski wrote in the 9-2 decision.
Barring a last-ditch appeal to the U.S. Supreme Court, the test results and samples will be destroyed, and prosecutors cannot use the information. Union lawyers said the government returned the evidence shortly after earlier trial court rulings.
The panel said federal agents trampled on players' protections against unreasonable searches and seizures, though the ruling came too late to spare players linked to the list, including Yankees star Alex Rodriguez and Red Sox slugger David Ortiz, who admitted they were on it.
Ortiz said he didn't care about the ruling, adding it won't help him almost a month after his name was leaked.
Atlanta star Chipper Jones agreed.
"It doesn't matter now," Jones said. "The names are already out there in the general public. We've already got a number out there. It's not going to be over until it's all out there."
Kozinski said the players' union had good reason to want to keep the list under wraps.
"The risk to the players associated with disclosure, and with that the ability of the Players Association to obtain voluntary compliance with drug testing from its members in the future, is very high," the judge wrote. "Indeed, some players appear to have already suffered this very harm as a result of the government's seizure."
The government seized the samples and records in April 2004 from baseball's drug-testing companies as part of the BALCO investigation into Barry Bonds and others. The list of 104 players said to have tested positive, attached to a grand jury subpoena, has been part of a five-year legal fight, with the players' union trying to force the government to return what federal agents took during raids.
Kozinski said the case was a significant test of the government's search and seizure powers in the digital age, and issued guidelines for investigators to follow in future raids that included submitting computers to independent computer experts for sorting of data.
The ruling vastly curtailed the federal government's performance-enhancing drug investigation. Federal prosecutors had maintained they wanted the names to investigate the players' drug sources, which could have kept alive a massive investigation started by a Dumpster-diving agent.
Instead, Wednesday's ruling means investigators are barred from accessing any names except for the 10 players listed on a 2004 search warrant. The names of those 10 have never been released, but the government said they had ties to the Bay Area Laboratory Co-Operative.
BALCO founder Victor Conte has long been critical of the actions of the government, especially then-lead investigator Jeff Novitzky.
"I have said that Novitzky has been using illegal tactics and not following the law since the day of the BALCO raid," Conte said. "He seems to just make up his own rules as he goes along."
U.S. attorney spokesman Jack Gillund in San Francisco said the government was reviewing its options, which could include an appeal to the U.S. Supreme Court.
Players' association lawyer Elliot Peters said the union was happy with the ruling but still angry that names of several players allegedly on the list have been leaked to journalists.
"Anyone who leaks information purporting to contain those 2003 test results is committing a crime," union leader Don Fehr and union general counsel Michael Weiner said in a statement. "We are very gratified by this decision, and hope that this will finally bring this long litigation to a close."
Peters declined to say whether he asked a federal judge to look into leaks from the list.
"If the government hadn't unconstitutionally seized this in the first place, there wouldn't have been any leaks," Peters said. The list's genesis goes back six years, to the time when an agreement between MLB and the players' association on drug policing was just being implemented.
In 2003, baseball conducted survey drug testing - without penalties. Each player provided a urine sample and an additional follow-up five-to-seven days later. Up to 240 players could be selected randomly for additional testing.
Two companies were involved, Comprehensive Drug Testing Inc. of Long Beach, Calif., and Quest Diagnostics Inc. of Teterboro, N.J., and samples were marked with codes to keep track as they were processed.
The union has said it had begun steps to destroy the results, but learned a federal grand jury subpoena had been issued for some of the test results and records as part of the BALCO investigation. That halted the destruction.
After months of wrangling, federal agents got a search warrant and seized samples from a Quest lab in Las Vegas and records from CDT in Long Beach on April 8, 2004 - records the appeals court now says never should have taken.
"There's nothing we can do about it," said Atlanta Braves first baseman Adam LaRoche. "They're out there. It's over with. I don't know if they can try to make it right or not."