"I am not in a position to agree with this decision. I am saying this very clearly: I don't concur with the decision and I have no respect for it," Erdogan told reporters before leaving on a trip to Africa.
"This issue is not remotely linked freedom of expression. It's a spying case," he said.
The Cumhuriyet newspaper's editor-in-chief Can Dundar and Ankara bureau chief Erdem Gul walked out of jail in Istanbul early Friday after the Constitutional Court ruled that their rights had been violated in their case.
But the pair, who were kept in jail for over 90 days, are still set to stand trial on the charges on March 25, with prosecutors demanding multiple life terms.
Also Read
"As Tayyip Erdogan, I believe in defending freedom of expression until the end," said Erdogan.
"But I do not believe in using freedom of expression... As a mask to attack to the country. Because this is espionage."
Dundar and Gul have been formally charged with obtaining and revealing state secrets "for espionage purposes" and seeking to "violently" overthrow the Turkish government as well as aiding an "armed terrorist organisation."
The newspaper report had sparked a furore in Turkey, fuelling speculation about the government's role in the Syrian conflict and its alleged dealings with Islamist rebels in Syria.