The officers were accused of being members of a terrorist organization, espionage and attempting to topple the Turkish government.
The judge released four other officers, but they were banned from leaving the country.
Omer Turanli, the police officers' attorney, said he will continue the legal battle to the end.
An investigation was launched in July 2014 over allegations that phone calls of then prime minister Recep Tayyip Erdogan, several ministers and the national intelligence chief, among many others, were illegally wiretapped.
Operations have been held across the country against the "parallel state," a movement allegedly formed by U.S.-based preacher Fethullah Gulen and his supporters.
Turkish officials blame Gulen and his movement for masterminding a plot to overthrow the elected Turkish government via supporters in the judiciary, police and other institutions.
An Istanbul criminal court recently issued an arrest warrant for Gulen as part of a probe into the "parallel state" operation. Turkey wants Gulen to be extradited from the U.S., where he has lived since 1999.