Mohamed Fahmy, who is Canadian and whose family hoped he would be deported, must pay 250,000 Egyptian pounds ($33,000) bail.
His colleague, Egyptian Baher Mohamed, was freed without having to pay bail.
The two must appear in court again on February 23.
Fahmy and Mohamed entered the packed courtroom in white prison uniforms, after Australian colleague Peter Greste was deported home earlier this month.
The three were accused of supporting the blacklisted Muslim Brotherhood and originally jailed for between seven and 10 years each.
Greste congratulated his two colleagues after their release was announced.
“This is a huge step forward. Not time to declare it over, but at least you get to go home!” the Australian wrote on Twitter.
A message posted on Mohamed’s Twitter feed simply said: “I AM FREE”.
Heather Allan, head of newsgathering at Al-Jazeera English, said: “We are very grateful. This is a great, great day for us and we just hope that… the whole thing is thrown out.”
Fahmy’s fiancee Marwa Omara tearfully hugged those around her as the pair’s release was announced while his mother, Wafaa Bassiouny, said her happiness will only be complete when he is acquitted.
Bassiouny also voiced concern about raising the bail. “It is a huge amount, we will do miracles to find it”.
Baher Mohamed’s wife, Jihan Rashid, also broke out in tears. “Half of the nightmare is over. Now I am waiting for his acquittal.”
Canada welcomed Fahmy’s release but denounced the retrial.
“The prospect of Mr Fahmy standing retrial is unacceptable,” said Canadian Consular Affairs Minister Lynee Yelich.
– Major embarrassment –
The case has been a major source of embarrassment for President Abdel Fattah al-Sisi as he seeks to shore up international support following a widely condemned crackdown on the opposition.
Fahmy had renounced his Egyptian citizenship to benefit from a law that allows the deportation of foreign defendants and which led to Greste’s release.