The unanimous ruling by a three-judge bench dealt a final blow to Djokovic's hopes of chasing a record 21st Grand Slam win at the Australian Open, after a rollercoaster.
The controversy became a political touchstone for Prime Minister Scott Morrison as he prepares for an election due by May. His government has faced criticism for its handling of Djokovic's visa application.
Morrison welcomed the court's ruling, saying the decision will help "keep our borders strong and keep Australians safe."
In Serbia, people have vented their anger at the treatment of their sporting hero. President Aleksandar Vucic on Sunday criticised Australia's government for what he called "more political than a decision made by the Australian judiciary."