The man had been living in the community for almost 10 years with his family and was detained in late 2019 after an adverse security assessment was made against him, relating to a business he operated overseas almost 15 years ago.
Under the interim order, the Minister for Home Affairs Peter Dutton is expected to authorise the man's removal from the Melbourne Immigration Transit Accommodation.
The court ordered that "as soon as reasonably practicable, but in any event by no later than 1.00 pm on 13 August 2020, the respondents cease to detain the applicant at the Melbourne Immigration Transit Accommodation centre".
Where the man is taken is at the minister's discretion and Justice Murphy has ordered the minister to give the man's lawyers 24 hours notice.
Given the order terms, this is likely to happen by Wednesday, unless appealed.
According to the man's lawyer Sanmati Verma, from Clothier Anderson Immigration Lawyers, the commonwealth's next move is clear.
"The court's decision makes it clear the commonwealth is unable to ensure the safety of vulnerable people such as our client in detention," she said in a statement.
Human rights law groups have called on Mr Dutton to release the man back into the community.
"Medical experts have warned for months about the risks of COVID-19 in immigration detention in Australia," Human Rights Law Centre legal director David Burke said in a statement.
Metropolitan Melbourne residents are subject to Stage 4 restrictions and must comply with a curfew between the hours of 8pm and 5am.
During the curfew, people in Melbourne can only leave their house for work, and essential health, care or safety reasons. Between 5am and 8pm, people in Melbourne can leave the home for exercise, to shop for necessary goods and services, for work, for health care, or to care for a sick or elderly relative.
All Victorians must wear a face covering when they leave home, no matter where they live.
People in Australia must stay at least 1.5 metres away from others. Check your state’s restrictions on gathering limits. If you are experiencing cold or flu symptoms, stay home and arrange a test by calling your doctor or contact the Coronavirus Health Information Hotline on 1800 020 080. News and information is available in 63 languages at sbs.com.au/coronavirus.