The Cumhuriyet newspaper's editor-in-chief Can Dundar and Ankara bureau chief Erdem Gul walked free from the Silivri jail on the outskirts of Istanbul to be greeted by jubilant supporters and family, the Cihan news agency and their newspaper said.
They had been detained since November over a report alleging that President Recep Tayyip Erdogan's government tried to ship arms to Islamists in Syria.
The pair had been due to go on trial on March 25 and had been held in jail for 93 days.
"The decision of the constitutional court is not just for us: it applies to all our colleagues, press freedom and freedom of expression."
Also Read
He noted the irony of being released on February 26, Erdogan's birthday. "We are very happy to be celebrating the birthday and the release," he added.
Gul added: "This is not a story of 'I wish I had not done'. It's a story of 'I wish I can continue,'" he added.
The constitutional court had ruled that their "rights to personal liberty and security had been violated," the court said in a statement on its website.
The decision was overwhelmingly approved with 12 votes for and three against, Turkish media reports said.
The case was then sent back to the lower criminal court which rubber-stamped the top court's decision and thus allowed the release of the journalists.
Dundar and Gul were placed under arrest in late November over a report in May that claimed to show proof that a consignment of weapons seized at the border in January 2014 was bound for Syria.