The Iraqi government wanted the guards to stand trial in Iraq and officials there said they would closely watch how the US judicial system handled the case.
Dean Boyd, a spokesman for the US justice department, said the department was "obviously disappointed by the decision".
Prosecutors can appeal the 90-page ruling and Boyd said the department was "still in the process of reviewing the opinion and considering our options".
Al Jazeera's Rosalin Jordan explained that the judge did say that the case can be brought back to court without prejudice but it was going to be difficult for the justice department to build the case from scratch without using the defendants' statements.
Blackwater Worldwide, which had been hired to guard US diplomats in Iraq at the time, has since changed its management and name to Xe Services.
"It really invigorates your belief in our court system"
Evan Liberty's lawyer
Despite a string of investigations following the deadly shooting and in spite of an Iraqi government ban on the company, the US state department extended a contract with a subsidiary of the firm in September to continue providing security to US diplomats in the country.
The five guards, Donald Ball, Dustin Heard, Evan Liberty, Nick Slatten and Paul Slough, all formerly in the US military, had been charged with manslaughter and weapons charges, which carried mandatory 30-year prison terms.
Defence lawyers said the guards were thrilled by the ruling after more than two years of scrutiny.
"It's tremendously gratifying to see the court allow us to celebrate the New Year the way it has," said lawyer Bill Coffield, who represents Liberty.
|The five Blackwater guards accused in the shooting were all formerly in the US military
"It really invigorates your belief in our court system."
Ball's lawyer, Steven McCool, said "it feels like the weight of the world has been lifted off" his client's shoulders".
"Here's a guy that's a decorated war hero who we maintain should never have been charged in the first place," he added.
Urbina's ruling does not say whether the shooting was proper, only that the government improperly used evidence to build the case.
After the shooting, the US state department had ordered the guards to explain what happened.
Investigators promised the men that their statements were to be used only for the internal inquiry and would not be used in a criminal case.
Such limited immunity deals are common in police departments so officers involved in shootings cannot hold up internal investigations by refusing to co-operate.
The deal meant that prosecutors had to build their case without using those statements, something Urbina said the justice department failed to do.
Prosecutors read those statements, reviewed them in the investigation and used them to get search warrants, Urbina said.
It was unclear what Thursday's ruling means for a sixth Blackwater guard, Jeremy Ridgeway, who had pleaded guilty to killing one Iraqi and wounding another.