In a unanimous decision, the court found the man's application for refuge had not been considered fairly and as such, his deportation to Kabul is now on hold.
In September last year the man, known to the court as "SZQRB", was due to be deported to Kabul after his application for asylum was rejected.
The matter was referred to the then minister for immigration, Chris Bowen, who had the power to grant the man a visa if he deemed it to be in the public interest.
Mr Bowen declined to consider the case.
Lawyers for the asylum seeker argued the decision was procedurally unfair and today the Federal Court accepted that argument.
It found Mr Bowen decided to deport the man regardless of whether the assessment of Australia's treaty obligations was factual or legally correct and even if his view that Australia did not owe the man protection was wrong.
Pamela Curr, from the Asylum Seeker Resource Centre, says the man was not given a fair go and suggested the Federal Government had set up a system to handle the cases of asylum seekers arriving by boat differently to other applicants.
"It was designed to exclude people rather than to examine their cases fairly and accept them," she said.
"That's what happened. This man is one of 120 that we know the Department and the Minister have marked for removal.
"Today, justice triumphed. He's not going anywhere at the moment. And we hope that they don't appeal it to the High Court."
The asylum seeker was briefed by his lawyer about the decision and issued a statement through an interpreter.
"I am proud and I am calm and I'm thankful," he said.
Ms Curr says the man, a Hazara, would face death if he was sent back to Afghanistan.
"It's life and death," she said.
"What we were talking about today was a man being loaded on a plane, sent back to Kabul. He would get off that plane and he would be marked. And he would surely be killed.
"Now, that's been stopped. And we've got to stop it for the other 120."
She says the asylum seekers facing deportation are victims of a flawed system.
"These 120 were victims, effectively, of a system. A flawed system. And this Government has been dead keen to send them back to Afghanistan in order to send a message. A message to tell people not to catch the boats," she said.