The government undertook not to deport the world's top-ranked player until the case was over, though he was ordered to return to pre-deportation detention at 8 a.m. on Saturday (2100 GMT on Friday) prior to his hearing.
Hoping the Serbian will still be able to begin the defence of his Australian Open title on Monday, his legal team submitted their appeal soon after Immigration Minister Alex Hawke used discretionary powers to revoke the visa.
The lawyers said they would argue Djokovic's deportation could be as much a threat to public health, by fanning anti-vaccine sentiment, as letting him stay and exempting him from Australia's requirement that all visitors be vaccinated.
Prime Minister Scott Morrison's government has won support at home for its tough stance on border security during the pandemic but not escaped criticism for the handling of Djokovic's visa application, and the saga has fuelled a global debate over vaccination rights and obligations.
Serbian President Aleksandar Vucic on Friday criticised Australia's government for what he called the "harassing and bullying (of) ... the best tennis player ever."
"(You'll) never come even close not only to (him), but to any ordinary person in our and your proud nations," Vucic said on Instagram.
A Serbian health ministry official defended Djokovic against doubts over the positive COVID-19 test the player used as the basis for his exemption document, whose QR code German news magazine Der Spiegel said had first displayed a negative and then a positive result.
Zoran Gojkovic said a ministry analysis showed the document to be "absolutely valid."
World tennis' governing body, the International Tennis Federation, called the situation "disappointing for all involved", saying countries' COVID-19 protocols needed to be communicated clearly, but also reserved criticism for Djokovic.
"While the ITF believes that full vaccination is a personal decision, we believe this is the responsible action we must all take in order to ease restrictions and avoid such occurrences happening in the future," it said in a statement.
Djokovic, 34 and bidding for a record 21st Grand Slam title, was told on arrival on Jan. 5 that the medical exemption that enabled him to travel was invalid. A court revoked that decision on procedural grounds.
But Hawke on Friday exercised his prerogative to cancel Djokovic's visa "on health and good order grounds."
Hawke said he had considered information from Djokovic and the authorities, and that the government was "firmly committed to protecting Australia's borders, particularly in relation to the COVID-19 pandemic".
Judge Anthony Kelly, who revoked the first cancellation, said the government had agreed not to deport Djokovic - who has opposed compulsory vaccination but not campaigned against vaccination in general - before the case concluded, and that the player could meet his lawyers.
The controversy has become a political touchstone for Morrison as he prepares for an election due by May.
"Australians have made many sacrifices during this pandemic, and they rightly expect the result of those sacrifices to be protected," he said in a statement. "This is what the minister is doing in taking this action today."
Australians have endured some of the world's longest lockdowns, and the country has seen a runaway Omicron outbreak bring nearly a million cases in the last two weeks.
More than 90% of Australian adults are vaccinated, and an online poll by the News Corp media group found that 83% favoured deportation for Djokovic.
His cause was not helped by an incorrect entry declaration, where a box was ticked stating he had not travelled abroad in the two weeks before leaving for Australia.
In fact, he had travelled between Spain and Serbia.
Djokovic blamed the error on his agent and also acknowledged he should not have done an interview and photoshoot for a French newspaper on Dec. 18 while infected with COVID-19.
But the player has been hailed as a hero by anti-vaccination campaigners.
Djokovic's legal team said the government was arguing that letting him stay in Australia would incite others to refuse vaccination.
One of his lawyers told the court that this was "patently irrational" because Hawke was ignoring the effect that forcibly removing "this high profile, legally compliant, negligible risk ... player" might have on anti-vax sentiment and public order.
Djokovic, looking relaxed as he practised at a Melbourne Park on Friday, was included in the draw for the open as top seed and is due to face fellow Serb Miomir Kecmanovic on Monday.
Greek world number four Stefanos Tsitsipas, speaking before Hawke's decision, said Djokovic was "playing by his own rules" and making vaccinated players "look like fools".
In Belgrade, some already appeared resigned to Djokovic missing the tournament.
"He is a role model to all of us, but rules must clearly be set," Milan Majstorovic told Reuters TV. "I am unsure how big the involvement of the politics is in that."
Another passer-by, Ana Bojic, said: "He can either vaccinate to remain world number one - or he can be stubborn and end his career."
(Reporting by Sonali Paul, Kirsty Needham and Ian Ransom in Melbourne, Aleksandar Vasovic in Belgrade and Sudipto Ganguley in Bangalore; Writing by Michael Perry, Robert Birsel, Kevin Liffey and John Stonestreet; Editing by Gareth Jones, John Stonestreet, Frances Kerry and Daniel Wallis)
By Sonali Paul and Kirsty Needham