Lawyers for Tharnicaa Murugappan started the legal action after the child and her family were taken from their home in Biloela, in regional Queensland, in 2018 and placed into immigration detention on Christmas Island.
The rest of her family – including mother Priya, father Nades and sister Kopika – have exhausted their legal options to challenge the government's refusal to let them stay in the country.
Both children were born in Australia but their parents do not have citizenship because they were deemed illegal arrivals.
In June, Tharnicaa was discharged from a Perth hospital after being medically evacuated from Christmas Island immigration detention centre.
They were held there for three years as they fought deportation to Sri Lanka.
The family has since been living in home detention in Perth.
But a court order prevented them from being kicked out of the country.
Tharnicaa's lawyers had been fighting a law that states she can not even apply for a visa, unless Immigration Minister Alex Hawke exercises his discretion to allow it.
Her lawyers had been trying to convince the High Court that she does have a valid visa application already in play.
Tharnicaa's last chance now rests with the minister, who holds the power to overturn the decision.
"The matter is now in the hands of the Immigration Minister and he or she is able at any point in time to grant a visa including a visa that would allow the family to return to and live in Biloela where they would receive community support, stability, care and a sense of belonging," the family's lawyer Carina Ford said.
"The Australian people's support in this case has been overwhelming as they have related to the families hardship and the fact both children were born in Australia."
Tharnicaa's mother Priya has thanked Australia for the "love and support".
"Tharni and Kopi are still having to see doctors, but this could happen back in my community of Biloela," she said.
"Biloela is where the girls will get better and be safe. Please Minister Hawke, let us return to our community in Biloela."
But in a statement issued a short time ago, Mr Hawke said it would be "inappropriate" to comment further on the case.
"Today the High Court declined to grant the Sri Lankan family formerly resident on Christmas Island special leave to appeal," Mr Hawke said.
"I note the High Court's decision follows a series of previous decisions by the Department of Home Affairs, Administrative Appeals Tribunal, Federal Circuit Court, Federal Court, Full Federal Court and High Court in relation to the family.
"The family has a number of other ongoing legal matters. It is therefore inappropriate for me to comment further."