Speaking to the media outside of the prison, Mr Burke said that he plans to attend the school tomorrow.
Last week, he sought a temporary injunction against a disciplinary appeals body tasked with reviewing his dismissal from the school.
In a hearing this morning, Mr Justice Brian Cregan said Mr Burke had raised "substantive" and "credible" issues against the Disciplinary Appeals Panel (DAP)
The judge said he was directing that Mr Burke be released from prison for "one reason and one reason only, interest in the administration of justice" and so that he has time to prepare for his case against the DAP.
He said this was on the condition that Mr Burke does not trespass on school property, and if he does, he directed that the school come to the High Court the next day and he will have "no hesitation in bringing him back to prison".
Mr Burke had been in prison for 550 days for contempt of court in relation to a direction not to attend Wilson's Hospital School, where he worked as a teacher.
After the High Court judge directed him to be released, Mr Burke said he did not believe the reasons given by the judge.
Mr Justice Cregan said he did not accept the assertions by Mr Burke and said he was "somewhat hamstrung" in preparing for the case while in prison.
While discussing various dates for the submission of affidavits, Mr Burke indicated to the court several times that he would attend Wilson's Hospital School when released.
"If I am released from this court today, I will be at my workplace tomorrow," he said.
"If I am released from prison, my duty is to be at my workplace."
The court maintained that Mr Burke should be released, but said the case would be put in for mention tomorrow to deal with whether Mr Burke attends the school.
Mr Burke then accused the court of an "outstanding U-turn" and of hypocrisy by choosing to release him from prison.
Mr Justice Cregan said: "Mr Burke, your ability to shoot yourself in the foot is unparalleled, in my experience."
