Can Dundar, editor-in-chief of leading opposition daily Cumhuriyet, and Erdem Gul, his Ankara bureau chief, are charged with espionage and revealing state secrets over a story accusing the government of seeking to illicitly deliver arms to rebels in Syria.
The judge today ordered the trial to be held behind closed doors, granting a request by the prosecution which cited security concerns around the highly controversial case.
"We are here to defend journalism," Dundar, 54, told reporters. "We will defend journalism and the right of the public to be told the truth."
Cumhuriyet's report sparked a furore when it was published in May, fuelling speculation about Turkey's role in the Syrian conflict and its alleged ties to Islamist groups in the country.
Also Read
Erdogan reacted furiously to the allegations, personally warning Dundar he would "pay a heavy price".
Dundar and Gul were arrested in November and held in pre-trial detention for three months before being released in February on the orders of the Constitutional Court, which ruled their right to free speech had been violated.
Dundar said he and Gul had found themselves "caught between two palaces: the palace of justice and the palace of illegality," referring to the lavish, 1,150-room presidential complex in Ankara which Erdogan had built at a cost of $615 million.
"The palace of justice, in following the decision of the Constitutional Court, released us, but the palace of illegality has done everything in its power to put us back in prison," Dundar said before going into court.
Gul said he had come to show that journalism "is not a crime".
"The Constitutional Court has recognised that what we did came under the practice of journalism," he said.
The prosecution of the journalists has sparked outrage among opposition and rights groups in Turkey as well as in the West, where it is seen as proof of Erdogan's determination to silence his opponents.
The prosecution has asked that Dundar and Gul be given two life terms and 30 additional years.
In a sign of the sensitivity of the case, several EU consuls to Istanbul attended the proceedings.